amplify-cli: deleted lambda layer version in aws console, not cannot run "amplify push"
Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker
Describe the bug A clear and concise description of what the bug is.
I deleted lambda layer version in aws console, and now I cannot run “amplify push”, I am stuck trying to do a cloudformation rollback where it is stuck in the “UPDATE_ROLLBACK_FAILED” state, the cloudformation template references a lambda layer that no longer exists. How do I fix this issue? It seems I cannot create a lambda layer with a previously used version
Amplify CLI Version
You can use amplify -v to check the amplify cli version on your system
To Reproduce Steps to reproduce the behavior or terminal output if applicable
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. Mac/Windows/Ubuntu]
- Node Version. You can use
node -vto check the node version on your system
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (16 by maintainers)
@cc-bojan : I have been struggling with the same issue for a week now and just resolved it. Here is what I did: Search your source code for the field
dependsOn[...]. I did this early on but it didn’t work because the amplify entries in.gitignorewere obscuring a number of the files in my IDE (VS Code). Once I temporarily renamed.gitignoretonot.gitignoreI was able to see the danglingdependsOn[...]references. Upon removing the problematic layer from thosedependsOn[...]sections, I was able to successfully runamplify remove function. Hope you are able to benefit from me pulling my hair out over the past week!