Thanks for the report Richie. I also have had AWS S3 image storage running for several years and came to this post via the console message. But the description at the top doesn’t say anything about the case that you already had S3 and just need a CDN.
For the record here is what I did:
- Went to AWS console, under Network and Content Delivery picked Cloudfront
- Clicked the Create distribution button
- Filled out the fairly obvious form, the only thing you really need to do on it is to pick your AWS S3 bucket where the images are from the drop-down menu.
- Waited a bit for the Cloudfront configuration to finish…
<gibberish>.cloudfront.net domain showed up in the “Domain Name” column of the Cloudfront Distributions list.
- I copied and pasted that domain into the
s3 cdn url field in my site admin File settings.
- I did some tests:
a. I made a new post with an image upload and indeed it was on cloudfront.
b. I hit Rebuild HTML on some random existing image posts and saw they also rebuilt with
- Since all looked good I went in and ran a rebake, which took several hours as I have around half a million posts now:
./launcher enter app
# rake posts:rebake
- All seems to be working fine. It put a ton of jobs in the sidekiq queue, one per post it looks like, which are going to take a few days to clear but it is chunking though them now.