Member-only story
AWS Serverless Deployment — 101
4 min readAug 16, 2020
AWS Lambda is the compute service under the AWS Serverless ecosystem. For development and deployment of Lambda function along with the infrastructure it needs, one tends to use development frameworks. Two of the most popular frameworks used for this purpose are —
- AWS Serverless Application Model (SAM)
- Serverless Framework
Assuming you are using AWS SAM, initializing a green field Hello World Lambda function with SAM CLI (tool that operates on an AWS SAM template and application code) is a three-step process:
Step 1 > sam initIn this step, you get the option to select runtime for the Lambda function, provide service name and few other options depending on the runtime selected. Once done, you get a folder structure with basic resources created.
The Hello World Function inside the template file looks as below:
Step 2 > sam package --s3-bucket <bucket name>In this step, the application code and dependencies are bundled into a deployment package and is pushed to S3 bucket. And generates a Yaml template file as output.