Description
Describe the bug
Developers need to be able to specify environment variables for debugging Lambda functions.
I tried specifying those values in lambda.environmentVariables
(seen below) with no luck. My workaround was to add them to the template.yaml, but that is not very flexible or natural when working with VS Code debug configurations.
All documentation I can find leaves lambda.environmentVariables
an empty object. For example, here.
The toolkit generated this .vscode/launch.json
for me:
To Reproduce
Steps to reproduce the behavior:
- use the toolkit to add a debug configuration for lambda functions
- specify environment variables with custom keys
- read the environment variable key in your code (nodejs for me)
- notice the key gives no value.
Expected behavior
I expect the debugging context to allow code to read from process.env.key
where key
is any key specified in the debug configuration lambda.environmentVariables
.
Desktop (please complete the following information):
- OS: Darwin x64 19.6.0
- Visual Studio Code Extension Host Version: 1.60.1
- AWS Toolkit Version: 1.29.0