This method allows you to iterate very quickly against Lambda code without having to run AWS resources locally.
Requirements
- must include the environment varibales on the Lambda to pass the SAMPLE_TABLE in (see line 17)
- use
sam deploy --guidedfor the first time deploy
Ths will create the table in the AWS dev account and will be accessible to the locally invoked Lambda function via the AWS CLI credentials
- Ensure it contains the name of the actual table created in the deploy
- I also have an "experimental" python script that will build this for you. (see build-params.py)
- requires an AWS CLI profile to be configured with CRUD access to dynamodb
sam local invoke getAllItemsFunction -n locals.json
sam local start-api -n locals.js