(official doc: https://github.com/awslabs/aws-sam-local)
You will need to install the following DVSA packages to make sure you have the security checks required in place:
- Install Docker (https://store.docker.com/editions/community/docker-ce-desktop-mac)
- Install aws-sam-local: npm install -g aws-sam-local 2.1) Verify the installation worked: sam --version
Usage (run this command from root folder):
- Invoke function: sam local invoke OR
- Run API Gateway locally: sam local start-api
Debugging Applications:
- Invoke a function locally in debug mode on port 5858: sam local invoke -d 5858 OR
- Start local API Gateway in debug mode on port 5858: sam local start-api -d 5858
- Hit endpoint: http://127.0.0.1:3000/
- Run debugger
Documentation for this service can be found here.