项目作者: bagubagu

项目描述 :
This is a template for sam init. `sam init --location gh:bagubagu/cookiecutter-sam`
高级语言: Python
项目地址: git://github.com/bagubagu/cookiecutter-sam.git
创建时间: 2018-07-18T04:07:01Z
项目社区:https://github.com/bagubagu/cookiecutter-sam

开源协议:

下载


Cookiecutter template for SAM

This repo is to be used with sam init --location.

Generate a new SAM based serverless app.

  1. sam init --location gh:bagubagu/cookiecutter-sam
  2. # make changes
  3. # ...
  4. # initial deployment as per template.yaml
  5. npm run deploy
  6. # upload lambda. run this anytime you modify lambda function
  7. npm run upload

Template design goal

  • exclude aws-sdk and other unused packages from the zipped deployment bundle
  • use typescript to leverage static typing, interface, autocompletion, aws-lambda definition
  • automate deployment. Make changes and just run npm run deploy

Exclude aws-sdk from the zipped deployment bundle

aws-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).