I want to redirect my domain to another domain in Amazon CloudFront.
Short description
To redirect a domain in CloudFront, use one of the following:
An Amazon Simple Storage Service (Amazon S3) website endpoint that returns a 301 status code
An edge function that redirects requests to the new domain
An Amazon S3 website endpoint redirection moves the existing URL path to the redirected domain. Edge functions allow you to redirect viewers to other pages based on information in the request, or rewrite all requests from one path to another.
Resolution
Use an Amazon S3 endpoint that returns a 301 status code