Skip to content

One or more of the CNAMEs you provided are already associated with a different resource. (SDK Attempt Count: 1) - AWS AMPLIFY

0

I have created/registered a custom domain in route 53 and created a hosting zone, and created an amplify app and connected with my custom domain, everything was working fine.. BUT i forgot to verify my email for domain as the email was in junk, my domain was removed after some days and amplify app got deleted. Now i have verified my domain and created a new amplify app but when i tried to map the custom domain. i get this error! i have deleted the hosting zone, created a new one. took the new name server names and replaced in my domain. and then i deleted the custom domain in amplify.. STILL THE SAME ERROR.. no cloud front distribution and no acm certs as i mentioned aws amplify managed certs

1 Answer
0

This is a common issue when trying to reuse a custom domain with AWS Amplify after deleting a previous app. Even though you've deleted the app, hosting zone, and don't see any CloudFront distributions, the association between your domain and a CloudFront distribution might still exist in AWS's systems.

Here's how to resolve this issue:

  1. Check for conflicting aliases: Use the AWS CLI to identify the conflicting distribution:
aws cloudfront list-conflicting-aliases --distribution-id <your-new-distribution-id> --alias <your-custom-domain>

This will show if there's a conflicting distribution and in which account it exists.

  1. Wait for propagation: When you delete resources and try to recreate them, it can take anywhere from a few hours up to 24-48 hours for AWS systems to fully update and clear previous associations.

  2. Verify DNS settings: Make sure you've completely removed all previous CNAME records related to the old Amplify app before adding new ones.

  3. Try disabling and re-enabling: If you still have access to domain settings in Amplify, try disabling and then re-enabling the custom domain.

  4. Contact AWS Support: If none of the above works after waiting for at least 6 hours, you might need to contact AWS Support to help clear any hidden associations with your domain name. You can do this through the "Account and billing" support channel, which is free.

The issue occurs because each custom domain name must be unique across all CloudFront distributions globally, not just within your account. When Amplify creates an app with a custom domain, it automatically creates an internal CloudFront distribution. Even though you deleted the app, this association might still exist in AWS's systems.
Sources
One or more of the CNAMEs you provided are already associated with a different resource | AWS re:Post
Can't Activate AWS Amplify Custom Domain | AWS re:Post
"One or more of the CNAMEs you provided are already associated with a different resource." issue when I add my CNAME's to my cloudfront distribution. | AWS re:Post
One or more of the CNAMEs you provided are already associated with a different resource. | AWS re:Post

answered a year 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.