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.

已提問 7 個月前檢視次數 188 次
1 個回答
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
專家
已回答 7 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南