- Newest
- Most votes
- Most comments
The issue you're experiencing with the ACM certificate remaining in 'Pending Validation' status indefinitely when deployed via CDK, while working fine through the console, could be due to a few reasons:
-
DNS Propagation: When using CDK, the process might be moving too quickly, not allowing enough time for DNS changes to propagate. The CNAME records need time to propagate across DNS servers, which can take anywhere from a few minutes to several hours.
-
Permissions: Ensure that your CDK deployment has the necessary permissions to create and modify DNS records in Route 53. The IAM role used for deployment should have sufficient permissions for both ACM and Route 53.
-
Region Mismatch: Verify that the ACM certificate is being requested in the same region where your Route 53 hosted zone is located.
-
Multiple Domains: Since you're requesting a certificate for both 'app.somedomain.com' and '*.app.somedomain.com', ensure that CNAME records for both are correctly added to your Route 53 hosted zone.
-
Nameserver Configuration: Double-check that your domain is using the correct nameservers. You can verify this using DNS lookup tools.
To troubleshoot:
-
Add a wait time in your CDK code after creating the certificate and before proceeding with other resources that depend on it.
-
Manually verify the CNAME records in your Route 53 hosted zone after deployment.
-
Check the ACM console for any specific error messages or validation details.
-
Ensure there are no Certification Authority Authorization (CAA) records blocking certificate issuance for your domain.
If the issue persists, you might need to delete the pending certificate request and initiate a new one. In some cases, the validation process can take up to 72 hours, so patience might be necessary if all other factors have been verified.
Remember, once successfully validated, ACM certificates are valid for 13 months and are automatically renewed if the DNS records remain in place, so this process shouldn't need to be repeated frequently.
Sources
Unable to request a Certificate in AWS | AWS re:Post
ACM Certificate is pending all the time | AWS re:Post
answered a year ago
Can you check the CNAME records for the validation are the same when performing with the Console vs SDK as theres no reason why it should fail
Hello, yes they match perfectly. See the response to the AI above. Thanks
Do you need to specify the hostedZone and region as part of the ACM request?
const certificate = new certificatemanager.DnsValidatedCertificate(this, 'Certificate', {
domainName: domainName,
hostedZone: hostedZone,
region: 'us-east-1', // Required for CloudFront
});
Hello, all of that info is inherited from the zone parameter I passed in.
I was able to find an answer to this issue and it is now working reliably. I will share it here in case anyone else is having a similar problem that may potentially have a similar root cause. First of all, I had linked a public spoke hosted zone (subdomain) to my main hosted zone (domain).
Main: somedomain.com Sub: sub.somedomain.com -> NS Record (A,B,C,D)
To link the subdomain to the main domain the NS record from the subdomain needs to exist as an NS record with the same name on the Main Domain. So the Main hosted zone had an NS record created for (sub.somedomain.com) with entries (A,B,C,D).
The certificate I was requesting from the Main domain was for sub.somedomain.com and Subject alternative name *.sub.somedomain.com. Even though route53 was allowing me to create both an NS record as well as an A record of the name (sub.somedomain.com) this was somehow causing the conflict! When I temporarily renamed the NS record of the subdomain or deleted the NS record completely the conflict was resolved and it started to work just fine.
answered a year ago
Relevant content
- AWS OFFICIALUpdated 3 months ago

The AI Answer is a little off track here..
Hello AI, Thanks for your response. The only possible option as to what may be causing the issue based on what you recommended, is to add the delay. However, I already have a cdk dependency that does not let the stack progress further until the certificate has been 'Issued' otherwise it will break the Cloudfront distribution deployment downstream. This is working because the stack is not deploying additional resources that depend on the certificate and for that reason it is hanging there until the certificate is issued.
The CNAME records are all created and valid in the hosted zone. This issue seems to be localized to cdk deployments because nothing else would explain why it is working on the console/ui. If the recommendation is to add a delay after the certificate request is submitted apart from the way I'm doing it, e.g. by utilizing the cdk dependency construct, then please let me know know how best to do that instead.
Thanks!