VS Code, AWS toolkit and SAM template is a great way to develop AWS lambda functions. But unfortunately AWS toolkit does not support Typescript yet. This boilerplate let you create AWS lambda using Typescript with Debugging Support.
- Download VS Code https://code.visualstudio.com/download
- Clone this repository
- run NPM install
- Install the AWS CLI https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-windows.html
- Install Docker.https://docs.docker.com/docker-for-windows/install/
- Install the AWS SAM CLI https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-windows.html
- Open command prompt from aws-sam-typescript-webpack-boilerplate directory
- run npm run-script watch
- Open another command prompt and run sam local invoke HelloWoldFunc -e src/helloWorld/event.json
- Enjoy!!
- Open this project at VS Code
- Set a Breakpoint where you want.
- run npm run-script watch
- run sam local invoke HelloWoldFunc -e src/helloWorld/event.json -d 5858
- hit Debug on VS Code or Press F5
- Wow breakpoint hited!!
- npm run-script test
- npm run-script watch
- npm run-script build