serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

Environment variables not updated

Open fade2black opened this issue 1 year ago • 0 comments

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

  1. OS: MacOS
  2. If using the SAM CLI, sam --version: SAM CLI, version 1.105.0
  3. AWS region: eu-central-1

fade2black avatar Feb 22 '24 12:02 fade2black