A Yeoman generator for basic lambda functions following the instructions below.
- Create a new blank github repository named after your to-be lambda function.
npm i -g yo
- Clone
generator-lambda-template
to your local machine.
cd generator-lambda-template
npm i
npm link
- Create a new directory named after your to-be lambda function.
cd [directory-name]
yo lambda-template:create
- Follow the prompts
git add .
git commit -m 'First commit with lambda template'
git push origin [branch name]
-
To get the function uploaded to AWS you need to create a zip file by running
./build.sh
this may require you runchmod +x build.sh
first. -
Head over to the AWS console, create your lambda function and add the zip file.
If your function requires any configs please create a config.json
file and add them to that.
The sample.json
file is to be filled in with a payload of what your lambda will receive.