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

0

I am using https://sst.dev/ to create 2 distributions. One is hosted on app.example.com and the other on example.com. When trying to deploy the example.com distribution I get the error in the title.

When I go to CloudFront and check the distributions, the alternative domain names are app.example.com and example.com respectively, so everything seems fine.

When I run the command

aws cloudfront list-conflicting-aliases --distribution-id ABC --alias example.com --profile Production

then it shows the ABC distribution itself as conflicting. Same when I do

aws cloudfront list-conflicting-aliases --distribution-id DEF --alias app.example.com --profile Production

it will show the DEF contribution as the conflicting one. This doesn't make sense to me. What else could be causing this error and how do I solve it? Is there something in Route 53? There are AAAA records there with the example.com and app.example.com pointing to the correct CloudFront distributions.

asked 7 months ago181 views
1 Answer
0

Hello.

I think the duplicate AWS account was displayed when you executed the command below.
Is that AWS account under your control?

aws cloudfront list-conflicting-aliases --distribution-id DEF --alias *.example.com --profile Production

You may be able to migrate by following the steps in the document below, so please try it.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move

If you are unable to migrate, you will need to contact AWS Support as described in the documentation.

Contact AWS Support to move an alternate domain name
If the source and target distributions are in different AWS accounts, and you don’t have access to the source distribution’s AWS account or can’t disable the source distribution, you can contact AWS Support to move the alternate domain name.

profile picture
EXPERT
answered 7 months ago

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