Reputation: 1117
My assets file is too large to upload my Rails app to heroku (I am getting the error 'slug size is too large'). I have many images in my app. Heroku recommends against using S3, and instead recommends Cloudfront CDN - https://devcenter.heroku.com/articles/using-amazon-cloudfront-cdn
Cloudfront is set up to get the assets from the heroku app. However, if I can't upload the app to heroku, Cloudfront will not see the assets to serve them. In this case, should I store the assets in S3 buckets, then serve them through Cloudfront, or take a different approach?
Thanks.
Upvotes: 0
Views: 220
Reputation: 8051
You've got the right idea.
If I were you, I'd start with part 1 only. The reason that Heroku recommends Cloudfront is that it will be able to serve the files much faster then S3. However, debugging issues is so much easier with just S3 since changes propagate instantly and it reduces one layer of indirection. On you're comfortable with S3, then add in Cloudfront for extra speed!
Upvotes: 1