Amplify - how to restart custom domain process?

0

We offer our customers the ability to create a full custom domain for our app, which is hosted on AWS Amplify.

When a customer adds their custom domain, we add it to the Amplify app. Amplify then returns two DNS records which the customer must create: one with a CloudFront distribution domain as the value, and a second used to verify domain ownership. Amplify immediately starts attempting to validate the existence and correctness of these two DNS records. When found and verified, Amplify deploys the CloudFront distribution. All good at this point.

However, if for some reason the customer make a mistake in the DNS records, Amplify will detect that and mark the domain as failed. Unfortunately, and as far as I know, even if the customer fixes the issue, there is now way to tell Amplify to attempt validation again.

Instead, we can only delete the Amplify domain and re-create it. And here is the big problem: Amplify now creates a different CloudFront domain and starts the validation process immediately. Why is this a problem? Because even if we give the new domain to the customer right away, it will take them some time to make the change, and in any case the corrected value will take some time to propogate, so there will be a period when the old value is returned. So, Amplify immediatley sees the old incorrect DNS value again, and immediatley fails, again.

As of now, I can only think of one solution -- first tell the customer to delete the old DNS values, then wait for DNS propogation, and only then create the Amplify domain, and give the customer the new DNS values. But, this is a really shitty experience for the customer.

Anyone have any ideas on how we can better handle this situation? It would be awesome if Amplify simply provided a way to tell it to restart the validation process, with the same DNS values, but I've already created a feature request for that, an I'm not sure it will happen any time soon.

Thanks for any info.

asked a year ago735 views
1 Answer
0
Accepted Answer

Hello from AWS,

Thanks for posting this query, I can understand that for cases where incorrect DNS records are added the DNS verification fails, and upon re-creation you get a new set of DNS records. Your current approach while managing the the DNS records with an external provider is correct. We would need to delete the existing CNAME records (like the old CloudFront distribution) of the associating domain from the DNS provider and wait for sometime for the DNS to propagate. Then, in the Amplify Console, delete the domain association for the same. After some time, add the required domain again in the Amplify Console and update the records (Actions >> View DNS records) provided by Amplify to your DNS provider. Once the records are added, kindly wait for some time for the Domain to get activated as the DNS propagation takes some time.

We regret the inconvenience caused due to this issue, and as you have already raised a feature request with our team, please be assured that they take customer feedback seriously and would work on improving the service.

Meanwhile, as a workaround you may also choose to leverage Route53 as your DNS service, as Amplify will automatically manage the DNS records for you which would limit the misconfigurations. Please refer below documentation to learn more about the configurations for the same.

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html https://docs.aws.amazon.com/amplify/latest/userguide/to-add-a-custom-domain-managed-by-amazon-route-53.html

AWS
SUPPORT ENGINEER
anurag
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.

Guidelines for Answering Questions