Setting up the CloudFront CDN distribution

As you may have noted, so far, we only have a URL generated by AWS. It is not friendly nor does it use our custom SSL certificate, so we may want to replace it with a custom domain and an SSL certificate. The API Gateway supports it out of the box, but it is very poor support, and first, it needs the certificate to be copies and pasted manually, which is not the best way of enabling SSL, especially for big corporates.

AWS is offering a better solution to solve all these issues and cover the lack of some features of API Gateway. CloudFront is the CDN offering of AWS, and it supports many features. Here, we will set up a CloudFront distribution, which will proxy API Gateway and we will gain many features, ...

Get Building Serverless Architectures now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.