amazon web services - Cannot upload files from S3 Development Bucket in Rails App -
when running rails app in development mode nitrous.io, cannot access development bucket set on aws s3. upload button opens personal computer, don't want load files. (even when try load files computer, long error message stating "the request signature calculated not match signature provided. check key , signing method"
i think don't have aws s3 configured properly.
currently, have 1 iam user, i've assigned administratoraccess also, using proper aws_access_key_id , aws_secret_access_key in application.yml file. in fog.rb have read enviroment.
i should add enrolled in web development apprenticeship program.
sorry not showing files
here's application.yml sensitive data taken out:
sendgrid_password: alphanumberic sendgrid_username: -------@heroku.com aws_access_key_id: alphanumeric aws_secret_access_key: alphanumeric development: aws_bucket: vmanamino-bloccit-development production: aws_bucket: vmanamino-bloccit-production development: secret_key_base: alphanumeric test: secret_key_base: alphanumeric
here's fog.rb file reads values environment
carrierwave.configure |config| config.fog_credentials = { provider: 'aws', aws_access_key_id: env['aws_access_key_id'], aws_secret_access_key: env['aws_access_key_id'], } config.fog_directory = env['aws_bucket'] config.fog_public = true end
you're using aws_access_key_id
environment variable both access key , secret access key whereas latter should of course using env['aws_secret_access_key']
Comments
Post a Comment