Building a SAM Application
Explore the process of building AWS SAM applications by installing and bundling dependencies for serverless functions. Understand how SAM CLI prepares code for deployment, manages build artifacts, and supports multiple programming languages to streamline AWS Lambda development.
We'll cover the following...
Step 1: Build
Most modern software programming languages make it easy to reference third-party libraries and packages. For example, Node.js comes with NPM, a package manager that installs the libraries listed in the package.json project manifest. Python works with pip. Java has maven. In order for Lambda functions to start as quickly as possible, you need to install and bundle dependencies before uploading it to AWS. CloudFormation doesn’t know how to do that. However, the SAM command line tools know how to install and bundle dependencies for many common package managers. For compiled languages, such as Java and Go, SAM knows how to turn source files into executable code.
To prepare the function source ...