Cloudflare domain to an AWS ApiGateway
Assuming that you already bought an domain on cloudflare, go to: DNS > Records Click on Add Record Type should be CNAME, if the api is using the root of your domain aka www.domain.com, the name should be @, otherelse use the sudomain e.g. api. The value of the target option should be the API Gateway domain name, you can find it on: API Gateway > APIs > Custom domain names Configure, within Api Mapping, the API of your choice, aswell the staging. That's all.
![Cloudflare domain to an AWS ApiGateway](https://media2.dev.to/dynamic/image/width%3D1000,height%3D500,fit%3Dcover,gravity%3Dauto,format%3Dauto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiig9wzqx2o2ucqnkcxi1.png)
Assuming that you already bought an domain on cloudflare, go to:
DNS > Records
Click on Add Record
Type should be CNAME, if the api is using the root of your domain aka www.domain.com, the name should be @, otherelse use the sudomain e.g. api
.
The value of the target option should be the API Gateway domain name
, you can find it on:
API Gateway > APIs > Custom domain names
Configure, within Api Mapping, the API of your choice, aswell the staging.
That's all.