Book Image

Building Serverless Architectures

By : Cagatay Gurturk
Book Image

Building Serverless Architectures

By: Cagatay Gurturk

Overview of this book

Over the past years, all kind of companies from start-ups to giant enterprises started their move to public cloud providers in order to save their costs and reduce the operation effort needed to keep their shops open. Now it is even possible to craft a complex software system consisting of many independent micro-functions that will run only when they are needed without needing to maintain individual servers. The focus of this book is to design serverless architectures, and weigh the advantages and disadvantages of this approach, along with decision factors to consider. You will learn how to design a serverless application, get to know that key points of services that serverless applications are based on, and known issues and solutions. The book addresses key challenges such as how to slice out the core functionality of the software to be distributed in different cloud services and cloud functions. It covers basic and advanced usage of these services, testing and securing the serverless software, automating deployment, and more. By the end of the book, you will be equipped with knowledge of new tools and techniques to keep up with this evolution in the IT industry.
Table of Contents (10 chapters)

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, such as the following:

  • Free SSL support via ACM (Amazon Certificate Manager)
  • HTTP/2 and IPv6 support
  • GZIP compression
  • HTTP caching