As well as building and maintaining the resources and configurations with CloudFormation, the CLI, or in the console directly, we can also manage the components in the Serverless Framework. To make it even easier, we can leverage the serverless SPA plugin:
- To install it, this time, we're going to use the serverless install command to create the new service. That's because this command has an option to input a URL, and we're going to input a URL that contains a boilerplate structure for an SPA project. Have a look at the following command:
sls install
--url https://github.com/serverless/examples/tree/master/aws-node-single-page-app-via-cloudfront
--name hello-website
What this command does is seed our service with the configuration we need to get started.
- After running the command, have a look at the serverless.yml...