- Newest
- Most votes
- Most comments
This is a common issue when trying to reuse a domain with AWS Amplify after it was previously associated with another AWS account. Even though you've moved everything to a new account and cleared Route53 records, the association between your domain and the CloudFront distribution (which Amplify uses behind the scenes) might still exist in AWS's systems.
The error message "The requested domain cannot be used by this AWS account" typically occurs when the domain name is still associated with a CloudFront distribution in your old AWS account. This is why your EC2 instance works fine with the custom domain, but Amplify doesn't - they use different underlying services for domain management.
Here are some steps to resolve this issue:
-
The domain or validation CNAMEs are likely still associated with an old CloudFront distribution, even though you no longer have any visible apps or distributions using this domain.
-
Each custom domain name must be unique across all CloudFront distributions globally, not just within your account. This is why you're encountering this issue even when you don't see any distributions in your new account's CloudFront console.
-
Wait longer - sometimes these issues resolve themselves after 24-48 hours as AWS systems update. Since you've already waited 3 days, this likely isn't the solution.
-
Contact AWS Support - this is your best option at this point. You'll need to contact them to help clear any hidden associations with your domain name. You can do this through the "Account and billing" support channel, which is free. They can help release the domain from any lingering associations in their internal systems.
AWS Support will be able to see the cross-account conflicts and help you properly release the domain so you can use it with Amplify in your new account.
Sources
Can't Activate AWS Amplify Custom Domain | AWS re:Post
Unable to associate domain gifted-project.net with Amplify - CNAME already in use | AWS re:Post
Relevant content
asked 3 years ago
