1.1.0 • Published 6 years ago
zappts-boilerplate-lambda v1.1.0
Lambdas-Boilerplate
Lambdas Boilerplate
Table of Contents
Installation
First, clone this Repository:
git clone https://github.com/zappts/Lambdas-Boilerplate.gitDepedencies
- AWS CLI already configured with Admin permissions
- SAM CLI
- NodeJS 8.10+ installed
- Docker installed
Usage
Local development
Running the project
sam local start-apiOR
sh run.shIf the previous command ran successfully you should now be able to hit the following local endpoint to invoke your function http://localhost:3000/hello
SAM CLI is used to emulate both Lambda and API Gateway locally and uses our template.yaml to understand how to bootstrap this environment (runtime, where the source code is, etc.) - The following excerpt is what the CLI will read in order to initialize an API and its routes:
Deploying the project
aws cloudformation package --template-file template.yaml --s3-bucket {INSERT-BUCKET-NAME-HERE} --output-template-file sam-packaged.yamlaws cloudformation deploy --template-file sam-packaged.yaml --stack-name {INSERT-STACK-NAME-HERE} --capabilities CAPABILITY_IAMOR
sh deploy.shContributing
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.
1.1.0
6 years ago