Search code examples
amazon-web-servicesdnsamazon-cognitoaws-route53

Unable to Add Alias Record in Route 53 for AWS Cognito Custom Domain: CloudFront Alias Target Missing


I am attempting to set up a custom domain for AWS Cognito login. I created a wildcard certificate (*.mydomain.com) in the us-east-1 region and then set up a custom domain for auth.mydomain.com. Shortly after, Cognito confirms the custom domain creation, and its status is marked as "Active". For the alias target, it shows d3gcpc0qbh736q.cloudfront.net.

When I go to Route 53 to create an A record for auth.mydomain.com, aliasing it to a CloudFront distribution, the CloudFront endpoint does not appear. I also checked the CloudFront distributions in the us-east-1 region, and there’s nothing listed there.

How can I resolve this issue?


Solution

  • That CloudFront distribution will not show up in your account, and it will not show up in the auto-populated drop-down thing in Route53 since it isn't one of the CloudFront distributions in your account. You simply need to copy/paste the alias target value from Cognito into that field in Route53.