'Route traffic to AWS cloudfront issue: one or more of the CNAMEs you provided are already associated with a different resource

I am trying to setup AWS Cloudfront distribution and route traffic from one of my subdomains to Cloudfront.

As per AWS documentation, I created and added a certificate to Cloudfront, then define alternative domain with that subdomain. However I always encountered this error:

CNAME error

I have checked thoroughly that I do not have another CNAME record which is associated with that subdomain.

I also tried to follow this guide from AWS to find any conflicting alias setup: https://aws.amazon.com/premiumsupport/knowledge-center/resolve-cnamealreadyexists-error/ but the problem is that my aws cli doesn't even have list-conflicting-aliases command. I am really stuck here. Any help will be appreciated. Thanks.



Solution 1:[1]

Already configured as you create subdomain in other AWS account. Then we get this error, for resolve this first we need to delete CloudFront distribution.

After that you can create the subdomain CloudFront distribution.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rajeev Gautam