aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Bug: No new Lambda Versions are deployed with Lambda configurations changes

Open mriccia opened this issue 1 year ago • 2 comments

Description:

When there is a SAM template with a Lambda function property AutoPublishAlias, I expect that changes to the Lambda function will publish a new Lambda Version. However, it seems that a new Version is not published in certain scenarios, if there are no code changes. For example: changes to the Logging configuration, and changes to the description.

Steps to reproduce:

  1. sam build && sam deploy a SAM project with a Lambda function with the AutoPublishAlias set
  2. Make changes to the Logging configuration
  3. sam build && sam deploy the project again

Observed result:

The Lambda configuration has changed, however there's no new version published

Expected result:

A new Lambda Version is published and the Alias is updated

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Mac OS
  2. sam --version: SAM CLI, version 1.115.0
  3. AWS region: eu-west-2
sam --info --debug
{ 
  "version": "1.115.0",
  "system": {
    "python": "3.12.3",
    "os": "macOS-14.4.1-arm64-arm-64bit"
  },
  "additional_dependencies": {
    "docker_engine": "25.0.3",
    "aws_cdk": "2.139.0 (build 2699ffd)",
    "terraform": "1.4.2"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}

Add --debug flag to command you are running

mriccia avatar May 24 '24 10:05 mriccia