- Newest
- Most votes
- Most comments
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:
- 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.
-
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.
-
Verify DNS settings: Make sure you've completely removed all previous CNAME records related to the old Amplify app before adding new ones.
-
Try disabling and re-enabling: If you still have access to domain settings in Amplify, try disabling and then re-enabling the custom domain.
-
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
Relevant content
- AWS OFFICIALUpdated a year ago
