Skip to content

Lightsail Certificates: Certificate validation always fails with external DNS managed by Cloudflare

0

Creating a certificate in AWS Lightsail, creating all the DNS validation records in Cloudflare and double checking every record via dig / nslookup always leads to failure:

Certificate created

Automatic validation failed. Manual validation required.

Auto validation failed because no matching DNS zone found in lightsail.

Status Failed

Querying certificates returns confusing information:

aws lightsail get-certificates --include-certificate-details

                    {
                        "domainName": "test1.example.com",
                        "resourceRecord": {
                            "name": "_f0b4ecc67af2fbdffff2cc67af2fb.test1.example.com.",
                            "type": "CNAME",
                            "value": "_1cace108509243555135551fd5092435q.acm-validations.aws."
                        },
                        "dnsRecordCreationState": {
                            "code": "FAILED",
                            "message": "Auto validation failed because no matching DNS zone found in lightsail."
                        },
                        "validationStatus": "FAILED"
                    },

NOTE: Actual domain data (names, records) in screenshots and command output were redacted / changed.

1 Answer
3
Accepted Answer

It turns out the issue was with the CAA records Cloudflare adds automatically which prevents other Certification Authorities to issue new certificates for those domains.

See the following resources for detailed answers and solutions:

answered 2 years ago

EXPERT

reviewed 2 years ago

EXPERT

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