Skip to content

AWS Amplify custom domain setup completely failing with default route 53 setup

0

Issue Summary AWS Amplify custom domain setup completely failing - missing IAM role preventing CloudFront distribution creation

Detailed Problem Description Primary Issue: Custom domain talesmio.com configured in AWS Amplify but not accessible despite multiple troubleshooting attempts.

Working Components:

Amplify app works perfectly: https://main.d18stl2jbjq41c.amplifyapp.com App ID: d18stl2jbjq41c Branch: main Failing Components:

Custom domain: https://talesmio.com - not loading Custom domain: https://www.talesmio.com - not loading Root Cause Analysis

  1. Missing Critical IAM Role:

Role Name: AWSAmplifyDomainRole-Z08355081XP7MM1S4KU0J Error Message: "The role with name AWSAmplifyDomainRole-Z08355081XP7MM1S4KU0J cannot be found" This service-linked role is required for Amplify to manage custom domains and CloudFront distributions 2. CloudFront Distribution Issues:

Multiple CloudFront distributions attempted but none exist in account: d33susi4t16ei6.cloudfront.net (404 error) dd4i9q0h3bgdf.cloudfront.net (404 error) dt2qaslcuyjaj.cloudfront.net (404 error, DNS points here but distribution doesn't exist) Current status: Zero CloudFront distributions in account 3. DNS Configuration Problems:

Route 53 records created but pointing to non-existent resources Current DNS points to IP addresses: 52.85.132.59, 52.85.132.8, 52.85.132.7, 52.85.132.4 Domain still not loading despite DNS resolution Current Configuration Status Route 53 DNS Records:

talesmio.com - A record pointing to multiple AWS IP addresses www.talesmio.com - CNAME record configured ACM validation record present: _25c858c5d247be5612e9fd9d9296a4b5.talesmio.com Amplify Configuration:

Domain management shows Route 53 entries created SSL certificate validation record present But actual domain not accessible Troubleshooting Steps Already Performed Verified Amplify app works correctly Confirmed DNS records exist in Route 53 Tested multiple CloudFront distribution URLs - all return 404 Verified no CloudFront distributions exist in account Confirmed missing IAM role AWSAmplifyDomainRole-Z08355081XP7MM1S4KU0J Attempted domain removal and re-addition Waited for DNS propagation (multiple hours) Expected Resolution Request AWS Support to:

Create missing IAM role: AWSAmplifyDomainRole-Z08355081XP7MM1S4KU0J Investigate why automatic role creation failed during Amplify domain setup Clean up orphaned DNS records pointing to non-existent CloudFront distributions Properly configure CloudFront distribution to serve content from Amplify app Complete custom domain setup so talesmio.com serves content from main.d18stl2jbjq41c.amplifyapp.com Business Impact Production website inaccessible via custom domain Users cannot access site using branded domain name SEO and marketing impact due to domain not working Urgency High - Production website custom domain completely non-functional

2 Answers
0

Based on your detailed description, there are several issues preventing your custom domain setup in AWS Amplify from working properly. Let me address the key problems:

  1. Missing IAM Role: The error regarding the missing "AWSAmplifyDomainRole-Z08355081XP7MM1S4KU0J" role is critical. This service-linked role is required for Amplify to properly manage custom domains and create CloudFront distributions. Without this role, Amplify cannot complete the domain setup process.

  2. CloudFront Distribution Issues: The fact that you have DNS records pointing to CloudFront distributions that don't exist indicates a failure in the Amplify domain association process. Normally, Amplify should create these CloudFront distributions automatically when setting up a custom domain.

  3. DNS Configuration: While your Route 53 records appear to be configured, they're pointing to resources that don't exist, which explains why your domains aren't accessible.

Here are some troubleshooting steps you can try:

  1. Delete the current custom domain configuration from your Amplify app completely.

  2. Check if there are any verification issues with your domain. Make sure your contact information for the domain is verified. AWS sends verification emails that sometimes go to spam folders.

  3. Check for any conflicting records or associations. Your domain might still be associated with another Amplify app or CloudFront distribution, even if you can't see it in your account. This can happen if the domain was previously used with Amplify.

  4. When re-adding the domain, try adding both the root domain (talesmio.com) and the www subdomain (www.talesmio.com) to ensure proper configuration.

  5. After adding the domain, wait for DNS propagation which can take up to 48 hours, though it's usually much faster.

If these steps don't resolve the issue, you'll likely need to contact AWS Support as you suggested. They can:

  • Create the missing IAM role or investigate why it's not being created automatically
  • Check for any "ghost" associations with your domain name in the AWS system
  • Help clean up any orphaned DNS records
  • Assist with properly configuring the CloudFront distribution

The missing IAM role is particularly concerning and likely requires AWS Support intervention, as this is a system-generated role that should be created automatically during the domain setup process.
Sources
Adding amplify custom domain hosted in route53 | AWS re:Post
Issues adding a custom domain to my Amplify application | AWS re:Post
Amplify custom domain setup issue | AWS re:Post
One or more domains requested are already associated with another Amplify | AWS re:Post

answered a year ago

  • Tried the solutions mentioned there nothing working

0

working fine now.

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.