Skip to content

Issue on adding custom domain on amplify app

0

Hello there, My domain was previously tied to an old AWS account. Even after removing Route 53 records and moving everything to a new account, AWS Amplify still blocks the domain throwing error: "The requested domain cannot be used by this AWS account. Please contact AWS support for assistance", but my ec2 enstance custom domain is working well. Its has been more than 3 days i got stock on adding custom domain on amplify.

asked 9 months ago202 views

1 Answer
0

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:

  1. 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.

  2. 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.

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

  4. 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

answered 9 months ago

EXPERT

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