I want to redirect my domain to another domain in Amazon CloudFront.
Resolution
Use an Amazon S3 website endpoint to redirect your domain
An Amazon Simple Storage Service (Amazon S3) website endpoint redirection moves the existing URL path to the redirected domain. Use an Amazon S3 website endpoint that returns a 301 status code. For instructions, see (Optional) Configuring a webpage redirect.
Use an edge function to redirect your domain
You can use an edge function to redirect requests to the new domain. Edge functions allow you to redirect viewers to other pages based on information in the request. Or, you can rewrite all requests from one path to another.