AWS Lambda Environment Variables implementation guide for Existing Function Invocations
I'm building a feature where I'm wondering if anyone has experience with I'm experiencing an scenario with AWS Lambda where the environment variables I updated are not reflecting in the existing invocations of the function... I updated the environment variables using the AWS CLI with the following command: ```bash aws lambda update-function-configuration --function-name myFunction --environment "Variables={KEY1=NEW_VALUE,KEY2=NEW_VALUE}" ``` After running this command successfully, I deployed the changes and confirmed that the environment variables were updated correctly by checking the AWS Management Console. However, when I invoke the function, it seems to still be using the old values. I tried invoking the function both through the AWS CLI: ```bash aws lambda invoke --function-name myFunction output.txt ``` and through the API Gateway, but in both cases, the old values are being used, and the output.txt file confirms that. I also checked the function logs in CloudWatch and thereβs no indication that the new values are being picked up. I ensured that the Lambda version I am invoking is indeed the latest by specifying the `$LATEST` qualifier in my API Gateway configuration. Additionally, I have the following configuration for my Lambda function: - Runtime: Node.js 14.x - Handler: index.handler - Timeout: 10 seconds Am I missing something in the process? Is there a caching mechanism that might be affecting the environment variable updates? Any insights would be greatly appreciated! Has anyone else encountered this? I'm working on a web app that needs to handle this.