Sample project that shows how a set of bash scripts can be used to implement a continuous deployment pipeline for an AWS Lambda function that act as a backend for an AWS API Gateway configured by AWS CloudFormation.
Please read the blog post for details.
In order to execute the scripts, you need to install the following tools:
- AWS CLI (AWS Command Line Interface)
- npm (JavaScript package manager)
- jq (JSON Command Line Processor)
Script | Description |
---|---|
0-create-stack.sh | Creates the stack |
1-test.sh | Executes unit tests |
2-package.sh | Creates .zip |
3-update-lambda.sh | Updates Lambda |
4-lambda-itest.sh | Executes Lambda integration tests |
5-publish-version.sh | Publishes Lambda version |
6-update-stage-alias.sh | Update stage alias |
7-api-gateway-itest.sh | Executes API Gateway integration tests |
8-update-prod-alias.sh | Update prod alias |
build-and-deploy-to-stage.sh | Build pipeline script |
update-alias.sh | Support script used by other scripts |
On the November 18th, 2016 AWS introduced the Serverless Application Model (or SAM for short) that provides an alternative solution to the one described in this blog post. Please read the AWS blog post and study the related project at the AWS Labs GitHub account for more information.