AWS Lambda with environment variables injected from SecretsManager #1072
Labels
addressed
Issue is addressed either through a release or further explanation
Backlog
We don't have the bandwidth to support this task right now, but will consider it in the future.
feature-request
A feature should be added or improved
I'm looking for a construct that sets up a lambda function with secrets before the lambda gets invoked.
Something a la https://github.com/aws-samples/aws-lambda-environmental-variables-from-aws-secrets-manager
Use Case
In nodejs, it's a hassle to move variables into secrets when you can only load secrets async. Top level await isn't straightforward either because web frameworks may bundle the server files into a single file and I don't have full control over which file appears first.
Proposed Solution
I'd like my secrets to be injected as env vars when the lambda is invoked. Preferably they'd only get loaded from SecretsManager on cold starts, and cached. It'd use a lambda layer like described in this https://github.com/aws-samples/aws-lambda-environmental-variables-from-aws-secrets-manager
Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: