Closed
Description
Description:
Changing or adding/removing environment variables for a function does not cause a new version to be published when using AutoPublishAlias
.
Steps to reproduce the issue:
- Deploy a SAM template with an
AWS::Serverless::Function
resource, withAutoPublishAlias
set, and including an environment variable:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: hello_world/
Handler: app.lambda_handler
Runtime: python3.8
AutoPublishAlias: live
Environment:
Variables:
TestKey: TestVal1
- Change
TestVal1
toTestVal2
. - Run sam deploy .
Observed result:
The lambda function is updated with the new environment variable, but no new version is published, and the defined alias still points to the last published version.
Expected result:
A new function version is published, and the defined alias is updated to point to it.