Error when trying to AWS command line associate alias
19:15 11 Oct 2022

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.

amazon-web-services amazon-cloudfront aws-cli serverless-aws-alias