This is a template for sam init. `sam init --location gh:bagubagu/cookiecutter-sam`
This repo is to be used with sam init --location
.
Generate a new SAM based serverless app.
sam init --location gh:bagubagu/cookiecutter-sam
# make changes
# ...
# initial deployment as per template.yaml
npm run deploy
# upload lambda. run this anytime you modify lambda function
npm run upload
aws-sdk
and other unused packages from the zipped deployment bundleaws-lambda
definitionnpm run deploy
aws-sdk
from the zipped deployment bundleaws-sdk
is already pre-installed in lambda environment. For that reason we do not have to and we do not want to bundle aws-sdk
into the deployment zip file. We use lambpack
to help with that.
The pre-configured node_module/aws-sdk
in package.json
is of version 2.249.1
. Which is the same version as what is is installed in the aws lambda container (according to https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html).