"NoSuchKey" error when deploying using newest CLI version
Describe the bug CloudFormation error
Amplify CLI Version 4.21.4
To Reproduce I upgraded to the newest version of amplify CLI, made a change to one of my lambda functions, and did an amplify push, and got this error:
The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: 5437F12F02AB66D4; S3 Extended Request ID: r5BX6fYCWTsWOhgSRbmcgYN0d5lNVhdmIpJm7Zn20awQi8bEsr27yLuyCwxDY3PdAfuwZ/0weUA=)
The error shows up under "GraphQLSchema" in CloudFormation
I have reinstalled 4.21.3 and everything deploys fine.
Expected behavior It should deploy as before
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows
- Node Version: v12.16.1
Hello @cjsedwards
- Was an update needed before doing the push?
- What were the steps taken that lead up to this error?
Had to revert everything so I'll log the steps to reproduce again:
- upgrade amplify cli
amplify install -g @aws-amplify/cli amplify pusha) API needs an update, say 'Y' to continue, and 'Y' to update graphql queries
No errors yet, but then I run the app and notice I'm getting backend errors because the graphql queries in my lambda functions no longer match the schema
- Update all of the hand-spun graphql queries where there are now required inputs
amplify pusha) Needs to update lambda function, say 'Y' to continue
Cloudformation error
This is related somewhat to another breaking issue #4617
@cjsedwards thanks for reporting the issue for your case an amplify push --force will provide a workaround to unblock you.
In the meanwhile stay on .3, the recent fix for hashing has a regression which is causing this failure. Closing this as a duplicate in favor of #4612
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.