-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-lambda): Layer updates not creating new function version #19098
Comments
Fixes #19098. This introduces two bug fixes that are hidden behind a feature flag to preserve the current hash: - lambda layer order is ignored by the hash now - lambda layer version is included in the hash (along with other lambda layer attributes) I also added a few more tests around this area to confirm the current behavior which should help demonstrate what the feature flag will change. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
modify cdk.json to enable this feature, pasting this inside the context: |
What is the problem?
If my stack contains a Lambda LayerVersion and a Lambda Function with an alias pointing to the newest version, content changes within the layer do not trigger deployment of a new Function version.
Reproduction Steps
Example stack demonstrating the problem:
The layer contents, defined in
layer-code/nodejs/node_modules/layer.js
:The Lambda function, defined in
function-code/index.js
:In
cdk.json
:What did you expect to happen?
Making content changes within
layer-code/nodejs/node_modules/layer.js
should trigger deployment of a new layer version and new function version, updating thelive
alias to point to the new function version.What actually happened?
A new layer version was created, as expected, but a new function version was not created. Invoking the function directly shows that the new layer version is being used, but invoking the function alias shows the old layer version is still in use.
CDK CLI Version
1.143.0 (build bebd295)
Framework Version
No response
Node.js Version
v16.13.2
OS
macOS 12.2
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: