I have looked at documentation on how I can redirect my traffic from one domain to another in AWS but to no avail I am unable to. The way I see the process using AWS is like so:
Route 53 ----> S3 ----> CloudFront ----> ALB ---> CloudFront?
What I have done are the following:
- I modified the A record of
monkey.com's CloudFront ID444fasdfdd.cloudfront.netto point to the CloudFront ID3dfdsafds3.cloudfront.netofape.com. - I modified the ALB used for monkey.com and created a Listener rule to redirect traffic of
www.monkey.comandmonkey.comtoape.com - I went to monkey.com's S3 bucket which is using Static Web Hosting and redirected the bucket to go to
ape.com. - This is where I am stuck, I do not know what to do on
monkey.com's CloudFront Distribution. I want to change the "Alternate Domain Name (CNAME)" ofwww.monkey.comandmonkey.comtowww.ape.comandape.comand replace the Custom SSL certificate of*.monkey.comwith*.ape.com; however, I receive an error saying I already have a Distribution ofape.com(which is true).
I hope I made myself clear on the issue I am having. If you want me to clear up any confusion please let me know.
CodePudding user response:
If you edited Route 53 A record for monkey.com to the CloudFront of ape.com, you are using ape.com as the backend, but the URL in the viewer's browser will still show as monkey.com.
Instead, what you need to do is keep Route 53 monkey.com and point it to a dummy website whose only purpose is to return a redirection to the new domain. You can use S3 website for this, or any other web hosting for that matter. Example of using S3 for redirection.
