I have an AWS S3 bucket named a.example.com which is hosting a static website.
Currently the CNAME DNS record for domain a.example.com
points to a.example.com.s3-website.us-east-2.amazonaws.com
.
Now I want to change the CNAME from a to b so that domain b.example.com should point to the same bucket, which will remain unchanged as a.example.com.s3-website.us-east-2.amazonaws.com
.
Thank you very much for your help.
You need to change only the CNAME from a to b so that domain b.example.com should point to the same bucket. You do not have any change in Amazon site, you only need to point your new hostname to the old bucket.