I have nodejs lambda which call aws parameter store to get value for a key, I wanted to call once. So try to set global value and get it in function but it failed. Any one help me. How to keep global scope for a value across lambda.
Aws nodejs lambda to call parameter store only once
Making the request and storing the value outside of the request handler will share that variable across invocations. But as soon as that container cools off, it will need refreshed.
https://docs.aws.amazon.com/lambda/latest/operatorguide/execution-environment.html
If you want to share values indefinitely across Lambda invocations then I suggest you use a Lambda Environment Variable
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments