Simple starter for new AWS Lambda functions. Provides base tools for testing (JEST), validating (TSLint) and custom scripts.
- app/jest.config.js - JEST framework configuration,
- package.json - NPM configuration,
- tsconfig.json - Typescript configuration required to run ts-node,
- cdk.json - AWS CDK configuration,
- bin/* - build and deploy scripts - referenced in package.json
- app/tslint.json - Tslint rules,
- app/tsconfig.json - Typescript configuration required to build and run application,
- app/src - example AWS Lambda handler,
- app/test - unit tests executed by JEST,
- stack/* - Cloudformation stack configuration in CDK format
npm test
- run unit tests fromtest
directory with framework JEST,npm run tslint
- check source files with Tslint,npm run build
- compiles files fromsrc
with Typescript compiler and outputs result tobuild
directory,npm run package
- builds deployment archive from compiled sources and dependencies localized innode_modules
.npm run deploy
- deploys lambda function with AWS CDK To save spacenpm prune --production
should be run before this command. Output is saved in filefunction.zip
.