Cloudflare over existing S3 bucket to serve images

Hi Community

I have an existing S3 Bucket that stores millions of images, with:

  • Created in April 2014
  • 3TB of existing data
  • 14 million images
  • Adding about 3000 images per day
  • configured web endpoint
  • AWS Cloudfront acting as a CDN over the S3 bucket

I want to use Cloudflare to help deliver

  • optimised image file sizes, using image resizer
  • cache images, for faster access

I have read plenty of documentation and blog posts on the right way to configure S3 bucket so that Cloudflare can provide the above.

Unfortunately, the initial setup of S3 is not configured correctly to achieve the desired outcome. As an example, the bucket is correctly configured with a website endpoint, however the naming convention of the bucket is incorrect and not to the suggested format as suggested by the articles I have read.

From everything I can see, I would need to create a new bucket and then move the existing files across which is a significant process, both in terms of time, and mamaging the sync of images as they upload.

My question to the community, has anyone overcome a similar challenge?? What did you do??

My alternative is to create a new bucket, correctly configured and have new images land in this new bucket. And in time, all active images will become live using Cloudflare, and older imahes will continue to be served using S3/Cloudfront.

Many thanks for any insights you can provide.

Cheers
Ryan

How do you plan on using the Image resizer? Using workers, or the default URL?

Default URL