Skip to content

Bug: Lambda function (with alias) doesn't create a new version after its layer is updated, even if AutoPublishAliasAllProperties is set to true #3612

Discussion options

You must be logged in to vote

Hi @zhanzhenzhen,
As @hnnasit mentioned we are currently aware of this issue. Here is some context and a workaround:

Context + Root cause

The reason the AutoPublishAliasAllProperties property is not picking up the changes to the Layers property is because of the specific ordering that we have when transforming the resources listed in a SAM template. The current implementation will translate all AWS::Serverless::Functions before translating the AWS::Serverless::LayerVersion. Because the Serverless::Function is translated first, the !Ref to the Serverless::LayerVersion will not have changed yet - that changes after we transform the LayerVersion but by then it won't go back to transform the S…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by paulhcsun
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/needs-feedback Needs feedback from the community (are you also interested in/experiencing this?)
4 participants
Converted from issue

This discussion was converted from issue #3610 on June 11, 2024 20:05.