Question

Newbish AWS question: Our Rails app currently allows image uploads via Carrierwave to an S3 bucket. Things work well...but it's starting to get a bit confusing (and cumbersome) as some original files are in one bucket (uploaded photos) while others are in another bucket (site logos, etc) while still others (javascript & css) are served directly from the Rails host.

We're looking at Cloud Front to possibly help consolidate & simplify our delivery...but none of us have any prior experience with it. Once properly configured (with a custom origin) can/should we expect to bring all assets back to our local server and then "simply" rely on Cloud Front for delivery? This would mean bringing all the uploaded images (currently on S3) back down to the local Rails server and instead of using Carrierwave with the Fog gem to upload them we just process & store the files on the local filesystem. This would have many advantages, chief of which is we'd have a complete copy of the entire application, including all assets, locally on our hosts.

Also, can we expect delays on a new image being served after it is uploaded...beyond what happens currently where there is a slight delay after processing an uploaded image as it is uploaded to S3 via Fog?

Lastly, is/would there be any reason to keep our S3 buckets alive? I understand "unused" assets are purged from CloudFront but it's not clear, to me anyway, what metric defines "unused".

Is this a common use case? Mostly just looking for validation or a told-you-so.

Thanks!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top