serverless-application-model
serverless-application-model copied to clipboard
Environment variables not updated
Description
I have lambda function in my cloudformation yaml file
ExportFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: MyFunction
PackageType: Image
Architectures:
- x86_64
MemorySize: 2048
Timeout: 60
Environment:
Variables:
USER: !Sub '{{resolve:secretsmanager:mysecret:SecretString:user}}'
PASSWORD: !Sub '{{resolve:secretsmanager:mysecret:SecretString:password}}'
Steps to reproduce
I go and change values of user and password inside the mysecret.
Deployment of the lambda function is triggered by pushing to a Github repo which in turn triggers AWS Codepipeline.
I even tried to trigger the codepipeline manually by clicking on Release change from the dashboard.
Observed result
I check Lambda's environment variables from the dashboard - nothing changes.
Expected result
Values of lambda's env variables should be updated with new values in the secret.
Additional environment details
- OS: MacOS
- If using the SAM CLI,
sam --version: SAM CLI, version 1.105.0 - AWS region: eu-central-1