1.1.0 • Published 6 years ago

zappts-boilerplate-lambda v1.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Lambdas-Boilerplate

Lambdas Boilerplate

Table of Contents

Installation

First, clone this Repository:

 git clone https://github.com/zappts/Lambdas-Boilerplate.git

Depedencies

Usage

Local development

Running the project

sam local start-api

OR

sh run.sh

If 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.yaml
aws cloudformation deploy --template-file sam-packaged.yaml --stack-name {INSERT-STACK-NAME-HERE} --capabilities CAPABILITY_IAM

OR

sh deploy.sh

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.