How it works...

In the resources section of the serverless.yml file, we define the WildcardCertificate resource to instruct the AWS Certificate Manager to create the desired certificate. We create a wildcard certificate so that it can be used by many services. It is important to specify the correct validationDomain, because this will be used to request approval before creating the certificate. You must also provide hostedZoneId for the top-level domain name. Everything else is handled by the serverless-spa-config plugin. The recipe deploys a simple site consisting of an index.html page. The endpoint for the site is used to create a Route 53 record set in the hosted zone and is assigned as the alias of the site's CloudFront distribution. The ...

Get JavaScript Cloud Native Development Cookbook 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.