generator-lambda
v2.0.1
Published
AWS Lambda function generator.
Downloads
4
Readme
generator-lambda
AWS Lambda function generator.
What it can do:
- Lambda function create/update/delete wrap.
- Connecting lambda to inputed S3 bucket with selected event
- Test code locally
- Provide test json in test directory, json files are same as the provide at the Lambda online test page. You can append or edit it definitely.
Getting Started
Install and use generator
# install generator
npm install -g generator-lambda
# run
yo lambda
Work with the generated lambda function
Structure
├── Makefile
├── index.js
├── package.json
├── test
│ ├── ctx.js
│ ├── helloworld.json
│ ├── s3_delete.json
│ ├── s3_put.json
│ └── sns.json
└── test.js
index.js
Function code here, please do not change the file name, if you want, please change theMakefile
too.Makefile
Wrap of aws cli, provide function create/update/deletepackage.json
Any extra dependency here, usenpm i --save
for reuse.test.js
Usenode test.js
to test locally, feel free to edit the file as you want
Makefile integrated
# create function, and connect it with inputed s3 bucket
make create
# update function code
make
# run code locally
make test
# delete function
make delete
License
MIT