Cloudfront Add Alias Issues - Invalid or missing alias DNS TXT records

0

I have a cloudfront distribution without any aliases. I can add a new alias in through the console just fine. However, when I try to add the same alias via awscli or boto3 (python), I continuously get the following error:

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

To add to this, the domain does not exist in Route53 but it also doesn't need to when I do it via the Console. So my usual workflow is:

  1. Create a distribution
  2. Add an alias something like myname.domain.com and myname2.domain.com
  3. Add route53 A record to point myname.domain.com and myname2.domain.com to the distribution ID/address

My goal is to achieve the same without having to use the Console but I'm not able to figure it out.

  • Can you post the CLI command you are submitting?

  • Sure, aws cloudfront associate-alias --target-distribution-id <distribution-id> --alias myname.domain.com

posta 2 anni fa1477 visualizzazioni
1 Risposta
0

According to the associate-alias documentation:

With this operation you can move an alias that’s already in use on a CloudFront distribution to a different distribution in one step. This prevents the downtime that could occur if you first remove the alias from one distribution and then separately add the alias to another distribution.

You should use the update-distribution command. Or set the alias(es) when you create the distribution.

profile pictureAWS
ESPERTO
kentrad
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande