1

I'm trying to associate an aws alias to a distribution, I currently have 2 distributions:

disbtA with an alternate domain www.example.com.

disbtB no alternate domain setup lets give it an id of 123

aws cloudfront associate-alias --target-distribution-id 123 --alias www.example.com

I get the error:

An error occurred (IllegalUpdate) when calling the AssociateAlias operation: Invalid or missing alias DNS TXT records.

They are both on the same account.

user2612665
  • 91
  • 1
  • 2
  • 11

1 Answers1

0

I missing this step:

Create a DNS TXT record that associates the alternate domain name with the distribution domain name of the target distribution. Create your TXT record with an underscore (_) in front of the alternate domain name. The following shows an example TXT record in DNS:

_www.example.com TXT d111111abcdef8.cloudfront.net

CloudFront uses this TXT record to validate your ownership of the alternate domain name.

user2612665
  • 91
  • 1
  • 2
  • 11
  • but what in this case if I want to create a record with the same name as HZ, like "example.com" -> d111111abcdef8.cloudfront.net – Mindaugas K. Jul 13 '23 at 14:14