I'm doing this heroku tutorial.
In the tutorial it mentions I need to set environment variables for S3_KEY, S3_SECRET, and S3_BUCKET.
I've created a S3 Bucket on AWS (Amazon Web Services), and I've used the unique name of the Bucket as my .env (I've created a .env file in my Rails project, and added it to .gitignore) S3_BUCKET variable.
However, in the tutorial I need to set S3_KEY and S3_SECRET.
Where do I find these variables? I can't seem to find them anywhere on AWS/S3. Am I suppose to generate these vars or what's the deal with these?
Second question: I will then have a model Photo that looks like this...
class Photo < ActiveRecord::Base
has_attached_file :image,
:styles => { thumbnail: "100x100#" },
:storage => :s3,
:s3_credentials => { :access_key_id => ENV['S3_KEY'],
:secret_access_key => ENV['S3_SECRET'],
:bucket => ENV['S3_BUCKET'] }
end
Will this now work in all my environments, including prod on heroku, or do I need to do anything special with heroku?