I am trying to create a new CloudFront distribution and associate the alternate domain name app.example.com with it. Additionally, I have a valid ACM SSL certificate issued for app.example.com in N.Virginia.

However, when I attempt to save the CloudFront distribution, I receive the following error:

"One or more of the CNAMEs you provided are already associated with a different resource."

Troubleshooting Steps Taken:

  1. Checked existing CloudFront distributions using the command:

    _aws cloudfront list-distributions --query "DistributionList.Items[*].{Id:Id,Aliases:Aliases.Items}" --output json_

    app.example.com is not listed in any of the CloudFront distributions.

  2. Checked for deleted CloudFront distributions (in case the CNAME was retained):

    _aws cloudfront list-distributions --include-deleted --query "DistributionList.Items[*].{Id:Id,Aliases:Aliases.Items}" --output json_

    The domain did not appear in deleted distributions either.

  3. Checked Route 53 records:

    app.example.com currently has:

    • An A record pointing to an internal ALB.
    • A CNAME for ACM certificate validation (which should not cause conflicts).

Has anyone faced a similar issue before?