Bug: Lambda function (with alias) doesn't create a new version after its layer is updated, even if AutoPublishAliasAllProperties
is set to true
#3648
Labels
stage/needs-feedback
Needs feedback from the community (are you also interested in/experiencing this?)
Discussed in #3612
Originally posted by zhanzhenzhen May 31, 2024
Description:
If we use alias for a lambda function (for provisioned concurrency, etc), it won't create a new version after its layer is updated, even if
AutoPublishAliasAllProperties
is set totrue
. So the alias still points to the old layer version. But the$LATEST
version is synced with the new layer version. Am I missing something, or is it a bug?Steps to reproduce:
sam build
, thensam deploy
. Visit the output URL."old layer"
with"new layer"
in thelayer/layer.mjs
file. Build and deploy it again. Visit the output URL.template.yaml
:lambda/app.mjs
:layer/layer.mjs
:samconfig.toml
:Observed result:
In step 1, the result is:
{"fnVersion":"1","layer":"old layer"}
.In step 2, the result remains the same.
Expected result:
I expect the result in step 2 to be
{"fnVersion":"2","layer":"new layer"}
.Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.114.0The text was updated successfully, but these errors were encountered: