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

0

I am trying to deploy a cloudfront distribution to use my domain name, but the deployment is failing with the error, "One or more of the CNAMEs you provided are already associated with a different resource."

I had a static website set up on an s3 bucket which used this domain a year or two ago. It's long been deleted, and I have controlled the domain the whole time, pointed at route53. I don't have any other AWS resources in my account which could be using the CNAME, including cloudfront, api gateway, elb, etc. There are only default records in my route53 hosted zone.

Many answers here have suggested running the following command to look for conflicting CNAME usage: aws cloudfront list-conflicting-aliases --distribution-id DISTRIBUTION_ID --alias ALIAS_NAME

Unfortunately, I don't believe this will work for me, as I'm not able to deploy the distribution, so I have no "DISTRIBUTION_ID".

I am still on the free tier, so not sure how to get help. If anyone has ideas on any of the above, I would be grateful.

jric
asked 9 months ago290 views
3 Answers
2

I think this the document you are looking for

https://repost.aws/knowledge-center/locate-cloudfront-distribution-owner-account

So you would create your distribution without CNAMEs and then check which account has the conflicting distribution. If the account is not one of your, you would need to contact AWS support to resolve the issue.

profile picture
EXPERT
Kallu
answered 9 months ago
0
Accepted Answer

Embarrassed to say that the conflict was another cloudfront distribution in the same account. It hadn't shown up in the Resource Explorer, so I didn't think it was still there, but I happened to check the CloudFront console and found it.

jric
answered 9 months ago
  • Good to hear you found it. If you think some of the answers helped in process you can accept multiple answers ;-)

0

Hi jric

You can use a CNAME lookup tool such as MxToolbox (https://mxtoolbox.com/CNAMELookup.aspx) or use the dig command (dig <domain>) to figure out what resource is attached to this particular domain.

Depending on the result you can remove the relevant records from the corresponding resource.

profile picture
Bisina
answered 9 months ago
  • I had tried that, but I don't think it's helping? It says "DNS Record not found". It also says, "Your DNS hosting provider is "Amazon Route 53"". It also says, "Reported by ns-153.awsdns-19.com on 7/29/2023 at 2:58:05 PM (UTC -5)".

  • Hi jric

    I think Kallu's answer will provide you with a better path forward to figure out this issue. Simply create the Cloudfront distribution without an alias then run the ListConflictingAliases command which will point you to the exact conflicting record.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions