scinote-web/config/initializers/aws.rb

11 lines
256 B
Ruby
Raw Normal View History

if ENV['AWS_ACCESS_KEY_ID']
Aws.config.update(
2016-02-12 23:52:43 +08:00
region: ENV['AWS_REGION'],
credentials: Aws::Credentials.new(
ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
)
)
2016-02-12 23:52:43 +08:00
S3_BUCKET = Aws::S3::Resource.new.bucket(ENV['S3_BUCKET'])
end