aws-amplify / aws-amplify/amplify-cli
Lambda layer wont update
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
### How did you install the Amplify CLI?
npm
### If applicable, what version of Node.js are you using?
_No response_
### Amplify CLI Version
8.1.0
### What operating system are you using?
Windows
### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
### Amplify Categories
function
### Amplify Commands
add, update
### Describe the bug
Any changes to the Lambda layer are not being recognized. According to https://docs.amplify.aws/cli/function/layers/#lambda-layer-versions and https://docs.amplify.aws/cli/function/layers/#update-layer-content on modifying a lambda layer changes will be detected and a new version will be created but the CLI currently does not recognize the changes.
methods tried:
1. modified the package.json with a new dependency
2. installed node modules using npm.
3. performed `amplify update function` for both function and layer.
4. performed `amplify env checkout` to trigger a new layer version.
### Expected behavior
CLI should be able to recognize layer changes and create a new version.
### Reproduction steps
1. `amplify add function`
2. select layer
3. `amplify add function`
4. add layer to function
5. `amplify push`
### GraphQL schema(s)
```graphql
# Put schemas below this line
```
### Log output
```
# Put your logs below this line
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.