- Newest
- Most votes
- Most comments
The issue was resolve by contacting tech support.
Using the following CLI command I discovered that the conflicting CNAME belongs to a separate account I don't own:
aws cloudfront list-conflicting-aliases --distribution-id YourDistributionID --alias YourCNAME
Maybe it was a previous domain owner.
The reply was like:
{
"ConflictingAliasesList": {
"MaxItems": 100,
"Quantity": 1,
"Items": [
{
"Alias": "****",
"DistributionId": "*******",
"AccountId": "******"
}
]
}
}
Then I contacted support and asked to provide me with priority in using my domain's name as CNAME. Then I waited for 4 days and the issue was resolved successfully.
If you don't know the distribution ID, use the ListConflictingAliases CloudFront API to find partial information about the distribution and the account ID for the conflicting CNAME alias. Then, use AssociateAlias API to move your CNAME from existing distribution (source distribution) to the new distribution (Target distribution).
Choose one of the following resolutions based on your scenario:
1. If your source and target distributions are in the same account, then complete the steps in the Use the AssociateAlias API to move your CNAME section.
2. If your source and target distributions are in different AWS accounts, then complete the steps in the Deactivate source distribution with the conflicting CNAME section.
3. If your source and target distributions are in different AWS accounts, and the source distribution can't be deactivated because of downtime to existing traffic, then complete the steps in the Use w**ildcard to move the alternate domain name section.
**
For more details check the link below https://aws.amazon.com/premiumsupport/knowledge-center/resolve-cnamealreadyexists-error/
Thank you! But all these steps suppose that you can have access and control both distributions. What if the source distribution is not mine?
You wont be able to list account if source is not owned by you, you might have to use another cname. You can try the steps Matt has mentioned if it helps.
But I did. Of course API call returned the account and distribution ids partially hidden by asterisks. But that was enough to figure out that the account was not mine.
Hi There
Are you using any other services like Amplify or an Edge Optimized API Gateway with a custom domain using this same domain name? Those services can create an AWS managed CloudFront distribution on your behalf in a separate AWS managed account which could be causing the conflict.
But I already found out that the conflicting CNAME usage belongs to a separate AWS account (not mine).
Right, as I mentioned, Those services can create an AWS managed CloudFront distribution on your behalf in a separate AWS managed account (not yours) so you do not have access to it. You would need to delete the Amplify App or Edge Optimized API Gateway (or change them to another domain). Then the CLoudFont distribution thats NOT in your account would get removed automatically.
Relevant content
- CloudFront - One or more of the CNAMEs you provided are already associated with a different resourceAccepted Answerasked 5 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 18 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
By using the following AWS CLI command: aws cloudfront associate-alias --target-distribution-id YourTargeDistributiontID --alias your_cname.example.com
I found out that the conflicting distribution belongs to another account (not mine).