Skip to content

Amplify custom domain stuck with "CNAMEAlreadyExists" - stale CloudFront distribution not visible

0

I am trying to add custom domain .org to my Amplify app (************). It keeps failing with:

"One or more aliases specified for the distribution includes an incorrectly configured DNS record that points to another CloudFront distribution."

I have deleted and re-added the domain 10+ times over 3 days. Each attempt creates a new CloudFront distribution but immediately fails. The conflicting distribution is not visible in the CloudFront console or via aws cloudfront list-distributions (returns empty). DNS is correctly propagated globally via Cloudflare.

I have a custom ACM certificate (***********************) covering *****.org and ******.org that is fully issued.


How can I remove ***.org from the stale internal Amplify/CloudFront distribution that is not visible via the API?

I believe this is a cross-account CloudFront CNAME conflict. The domain *.org was previously hosted on GoDaddy which may have used CloudFront internally. The stale alias claim is likely in GoDaddy's AWS account, not mine (*****************).

  • If the stale alias is in GoDaddy why are you here asking about AWS solutions? GoDaddy is a 3rd party nothing to do with AWS support no matter what they use under the covers.

2 Answers
1

Hello.

If you contact AWS support, using the following wording should help the process go smoothly.
https://repost.aws/ja/questions/QU3RJ4JmatQM2p8V7uDvAchw/ssl-setup-failed-both-root-and-www-stuck-on-expired-2023-amplify-distribution-cname-already-associated-with-different-resource-confirmed-not-in-my-cloudfront-account

You can also check for duplicates using the following command.
I've experienced the same error before, but it resolved itself automatically after waiting 2-3 hours.
It's possible that AWS is causing delays in the deletion process due to internal reasons.
https://repost.aws/knowledge-center/locate-cloudfront-distribution-owner-account

aws cloudfront list-conflicting-aliases --distribution-id YourDistributiontID --alias kkssd.org
EXPERT

answered 3 months ago

EXPERT

reviewed 3 months ago

  • Thank you. i have reached out to AWS support multiple times, as this is non profit org and free account, i am not receving any support yet.

0

The error you're encountering indicates that the alternate domain name (kkssd.org) is already associated with a different CloudFront resource that you cannot see. This is a common issue when domain names remain attached to distributions that are not visible through standard API calls or the console.

To resolve this situation, you'll need to work with AWS Support to identify and remove the domain name from the hidden or stale distribution. Here's what you should do:

  1. Contact AWS Support - Since the conflicting distribution is not visible through the CloudFront console or API, AWS Support will need to investigate this at the backend level. They have access to internal tools that can identify where the domain name is currently associated.

  2. Provide the details you've shared - Give AWS Support your account ID (601548054009), the domain name (kkssd.org), the Amplify app ID (d4sw2vgd2cibm), and the region (us-east-2). This will help them locate the stale association quickly.

  3. Request domain name disassociation - Ask AWS Support to disassociate kkssd.org from any hidden or stale CloudFront distributions or Amplify resources in your account.

  4. Verify DNS configuration - While waiting for AWS Support, ensure your Cloudflare DNS records are pointing to the correct CloudFront distribution that Amplify is trying to create (though this may change once the issue is resolved).

This type of issue typically requires AWS Support intervention because the stale distribution exists in a state that's not accessible through normal customer-facing APIs or consoles. Once AWS Support removes the association, you should be able to add the custom domain to your Amplify app successfully.
Sources
Move an alternate domain name - Amazon CloudFront

answered 3 months ago

EXPERT

reviewed 3 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.