Image for post
Image for post

If you know how to use S3 for static site hosting, you will find it pretty easier to setup a CloudFront distribution and map it as a CNAME to your custom domain. However, it requires more manual operations to use a custom domain for API Gateway. API Gateway requires that you use https, but the certificate that it uses is only valid for the default domain.

Let’s say we have an URL generated by API Gateway:

This is what we want:

To do this, we are going to use Let’s Encrypt to get a free SSL certificate to…

George Jor

Software Engineer (Node / GraphQL / React Native / Vue.js / TypeScript / MongoDB / Redis)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store