How to CNAME to Amazon API Gateway Endpoint

前端 未结 4 660
太阳男子
太阳男子 2020-12-23 16:38

I\'m trying to set a CNAME on Cloudflare to point to an Amazon API Gateway endpoint. The CNAME is for use when referring to one of my subdomains. The gateway in turn points

4条回答
  •  心在旅途
    2020-12-23 17:12

    I couldn't get any of the other answers to work. So I ended up having AWS generate the certificate instead of using a Cloudflare Origin one. That's because AWS wouldn't accept my Cloudflare certificate, even when the chain was provided. I couldn't see Cloudflare in Mozilla's Certificate Authority list (which is what AWS relies on, according to the docs) so I guess that makes sense.


    Here's the outline of my solution:

    1. Create AWS Route53 Zone
    2. Create AWS ACM Certificate (must be in us-east-1) with validation method DNS
    3. Create Cloudflare DNS Record with the output of (2)
    4. Create AWS API Gateway Domain Name
    5. Create Cloudflare DNS CNAME Record pointing '@' (root domain) to the Cloudfront domain name from step (4)
    6. Create AWS API Gateway Base Path Mapping

    This should be roughly it. May this help someone. Feel free to ask questions.

提交回复
热议问题