Reputation: 3889
I'm creating an A record in my Route 53 hosted zone for a subdomain. When I select "Alias to Cloudfront distribution", only US East zone shows in the list, containing an undesired distribution:
However I want to point to another distribution which is not showing in the list. Any idea why it's not showing? The distribution is ready and can be accessed using the cloudfront URL, pointing to a static s3 hosting bucket. I created it using amplify cli hosting, s3+cloudfront option if it matters.
Thanks for any help.
Upvotes: 4
Views: 3424
Reputation: 3365
I encountered this even when the distribution was deployed with the correct alternate domain name added. It seems like a bug in the Console as copy-pasting the cloudfront domain (id.cloudfront.net) worked fine.
Upvotes: 1
Reputation: 238051
Based on the comments.
The issue was caused because the CloudFront distribution in question did not have Alternate Domain Name set witch matches the record in Route53. From docs:
The distribution must include an alternate domain name that matches the domain name that you want to use for your URLs instead of the domain name that CloudFront assigned to your distribution.
Upvotes: 12