Just launched! Get 30% off Rails Revisited Have a Look

Setting Up S3 CDN

Buy or Subscribe

You can access this course in just a minute, and support my efforts to rid the world of crappy online courses!

Buy Standalone  Subscribe

Setting up S3 is a matter of uncommenting some settings in your config/storage.yml file:
  service: S3
  access_key_id: <%=ENV.fetch("AWS_ACCESS_KEY_ID")%>
  secret_access_key: <%= ENV.fetch("AWS_SECRET_ACCESS_KEY") %>
  region: us-west-1
  bucket: bigrails
  public: true
You then need to set config/environments/production.rb to use the amazon provider:
config.active_storage.service = :amazon