0

I am trying to connect CloudFlare to API Gateway

Steps followed are:

  1. Generated certificate in Cloudflare
  2. Imported certificate in certificate manager in AWS
  3. Made Full Strict in Cloudflare
  4. in API gateway, for custom domain, I gave the domain name. Selected edge optimized and selected my certificate I imported. I am getting following error

The certificate that is attached to your distribution was not issued by a trusted Certificate Authority. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidViewerCertificate;

1 Answers1

0

The mistake I was doing was, I was importing the certificate to the Certificate Manager. I used the .pem encoded string and imported.

What worked for me was instead of importing, I went through the " Request for certificate" process. This can be approved via DNS modification or through email approval(faster way).

The change I observed was, "Request for certificate" is AWS issued and the former is not. Using this I generated Edge optimized custom domain which gave me a cloud front URL. I used this to link with CNAME in my Cloudflare DNS