We are going to be using AWS Lambda, Amazon API Gateway, and a host of other AWS services to create our application. AWS Lambda is a compute service that lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running. But working directly with AWS Lambda, API Gateway, and the other AWS services can be a bit cumbersome.
Since these services run on AWS, it can be tricky to test and debug them locally. And a big part of building serverless applications, is being able to define our infrastructure as code. This means that we want our infrastructure to be created programmatically. We don’t want to have to click through the AWS Console to create our infrastructure.
To solve these issues we created the Serverless Stack Framework (SST).
SST makes it easy to build serverless applications by allowing developers to:
- Define their infrastructure using AWS CDK
- Test their applicaitons live using Live Lambda Development
- Set breakpoints and debug in Visual Studio Code
- Deploy to multiple environments and regions
- Use higher-level constructs designed specifically for serverless apps
- Configure Lambda functions with JS and TS (using esbuild), Go, Python, C#, and F#
We also have an alternative guide using Serverless Framework.
Before we start creating our application, let’s look at the infrastructure as code concept in a bit more detail.