Ask A Question


You’re not receiving notifications from this thread.

Amazon S3 in blog tutorial error

Mike Cannon asked in Rails

I am following the Go Rails blog tutorial. Currently trying to work through trying to set up Amazon S3 to upload images from the blog app. I've retraced the steps from the blog numerous times. I know that my access_key_id and secret_access_key are set in my credentials file but can't get past the following error:
Aws::Sigv4::Errors::MissingCredentialsError in ActiveStorage::DirectUploadsController#create

missing credentials, provide credentials with one of the following options:

  • :access_key_id and :secret_access_key
  • :credentials
  • :credentials_provider

Any insight is appreciated.


Make sure you added the credentials to the right credentials file (using rails credentials:edit --environment development) and that you've added it to all of the ones you need.

You can also open up the Rails console and use Rails.application.credentials to confirm they're loaded properly.


Thank you Chris - subscribed to GoRails today. Your suggestion got me past the error I was having but not quite there to being able to upload an image to S3. Now it's throwing:

SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.AKIA6GBMFLWUWUVRFEWIAWS4-HMAC-SHA256

I have triple checked the access keys so I know they are correct. How do you check the signing method?

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,149+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.