Skip to content

Amplify Cannot Create Domain IAM Role, SSL Certificate, or CloudFront Distribution

0

Hello AWS Support Team, I am unable to connect my custom domain to AWS Amplify Hosting because Amplify fails during the SSL creation stage and does not create the necessary IAM service-linked roles or the Amplify domain role. Symptoms

When adding my domain in Amplify (manual configuration), the process fails immediately at SSL creation.

A toast notification appears: “The role with name AWSAmplifyDomainRole-xyz cannot be found.”

No ACM certificates are created in any region (checked in us-east-1 and ap-south-1).

No CloudFront distributions are created.

Creating the domain in Amplify shows DNS records, but validation never starts because ACM and CloudFront were never created.

Service-Linked Role Creation Failure When I attempt to manually create the required SLRs via CLI, the following errors occur: aws iam create-service-linked-role --aws-service-name amplify.amazonaws.com → An error occurred (AccessDenied): Cannot find Service Linked Role template for amplify.amazonaws.com

aws iam create-service-linked-role --aws-service-name cloudfront.amazonaws.com → An error occurred (AccessDenied): Cannot find Service Linked Role template for cloudfront.amazonaws.com

The ACM SLR was created successfully: aws iam create-service-linked-role --aws-service-name acm.amazonaws.com → Succeeded

I am logged in as the root user, so this does not appear to be a permissions issue. What I Have Already Tried Removed and re-added the domain in Amplify multiple times Deleted all existing CloudFront distributions Confirmed no certificates exist in ACM Cleaned up Route53 hosted zones Created a custom IAM role (AWSAmplifyDomainRole-Custom) with full permissions: AdministratorAccess-Amplify AmazonRoute53FullAccess AWSCertificateManagerFullAccess CloudFrontFullAccess Attempted to attach this role manually, but Amplify still does not create CloudFront or ACM resources Tried creating SLRs manually (Amplify + CloudFront), but only ACM SLR succeeds Verified with CLI that SLR templates for Amplify and CloudFront cannot be found

What I Need Help With Why is create-service-linked-role failing for: amplify.amazonaws.com cloudfront.amazonaws.com

Why is Amplify unable to create: --The required service-linked role --The AWSAmplifyDomainRole-* role --SSL certificate in ACM --CloudFront distribution

Whether something is misconfigured in my AWS account backend (e.g., missing SLR templates, service not enabled, regional restriction, account configuration issue, backend issue). How to unblock Amplify so it can automatically create: -The domain IAM role -SSL certificate in ACM -CloudFront distribution -Domain association

this below is the current error i am again and again getting: SSL setup failed One or more aliases specified for the distribution includes an incorrectly configured DNS record that points to another CloudFront distribution. You must update the DNS record to correct the problem.

1 Answer
0

The SLR creation failures for amplify.amazonaws.com and cloudfront.amazonaws.com are expected. Amplify does not use service-linked roles (confirmed in AWS docs: "Amplify does not support service-linked roles"). CloudFront has an SLR only for VPC Origins, which uses a different service principal and is created automatically. Neither service has an SLR template matching what you tried. This is not your problem.

Your actual error is: "One or more aliases specified for the distribution includes an incorrectly configured DNS record that points to another CloudFront distribution."

This is the CNAMEAlreadyExists error. It means your domain (or a subdomain) has a DNS record (CNAME or ALIAS) that resolves to a CloudFront distribution that already claims that domain as an alternate domain name. Two CloudFront distributions cannot use the same alternate domain name simultaneously.

To resolve:

  1. Check if you have a CNAME or ALIAS record pointing to a .cloudfront.net domain:
dig your-domain.com CNAME
dig www.your-domain.com CNAME
  1. Find the distribution claiming your domain:
aws cloudfront list-distributions \
  --query "DistributionList.Items[?Aliases.Items[?contains(@,'your-domain.com')]].[Id,DomainName,Aliases.Items]" \
  --output table
  1. If found in your account, either delete the distribution or remove the alternate domain name from it.

  2. If NOT found in your account (common with previously deleted Amplify apps), open a support case. AWS can disassociate the domain from the orphaned distribution on the backend.

  3. If you previously used this domain with Amplify in a different region or account, the old app may still hold the domain association even if the app appears deleted. Check all regions:

for region in us-east-1 us-west-2 eu-west-1 ap-south-1; do
  echo "--- $region ---"
  aws amplify list-apps --region $region \
    --query 'apps[].{name:name,id:appId}' --output table
done

References:

answered a year ago

AWS
SUPPORT ENGINEER

reviewed 5 months ago

AWS
SUPPORT ENGINEER

revised 5 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.