Local AWS lambda service call via sam / aws sam cli, you can also attach debugger to VSCode via configuration settings.json
$ sam local invoke --profile=dev MyServiceName1 -e events/events-MyServiceName1.json -n env/env-MyServiceName1.json| { | |
| "launch": { | |
| "configurations": [ | |
| { | |
| "type": "aws-sam", | |
| "request": "direct-invoke", | |
| "name": "Invoke Lambda", | |
| "aws": { | |
| "credentials": "profile:dev", | |
| "region": "us-east-1" | |
| }, | |
| "invokeTarget": { | |
| "target": "template", | |
| "templatePath": "${workspaceFolder}/template.yaml", | |
| "logicalId": "MyServiceName1" | |
| }, | |
| "lambda": { | |
| "runtime": "nodejs14.x", | |
| "environmentVariables": { | |
| "ENV_1": "asdf", | |
| "ENV_2": "asdf2" | |
| }, | |
| "payload": { | |
| "path": "${workspaceFolder}/events/events-MyServiceName1.json" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } |