Can I Use same AWS S3 bucket for 2 domain

I am using AWS S3 bucket for storing and displaying the user upload image files.
My website name is example. net and as I want to use cloudflare CDN and show the image url path as images.example. net (as I want to mask the S3 url).
I created a S3 bucket with name images.example. net and mapped the CNAME images com as images. So I am able to access the images using url images.example. net/myPic.jpg
Recently I got a new domain example. com (only the extension is different), and now I want to use the same S3 bucket example. net to store the files and the url needs to shown as images.example. com/myPic.jpg when I try to pull the files.
Can I do it without creating a new bucket named images.example. com ?

That’s completely up to AWS. If you can get a domain resource working fine without Cloudflare, then you can add it to Cloudflare and still be fine.

Thank you for the reply.
Normally we can use same bucket for 2 different domains. But what I m trying to achieve is little different.
As I mentioned earlier, my current S3 bucket is images.example. net and currently using CNAME i mapped into CNAME images using net . And for my new domain using the same S3 bucket , I want to map into url images.example. com. If I create a new S3 bucket images.example. com , then I can do it, but I want to use the existing one only.
Is there any method to configure in cloudflare for that ?

You could use a Worker, but you may need a software developer to find tune the code for your situation:

This topic was automatically closed after 14 days. New replies are no longer allowed.