amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

"NoSuchKey" error when deploying using newest CLI version

Open cjsedwards opened this issue 6 years ago • 5 comments

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

cjsedwards avatar Jun 19 '20 13:06 cjsedwards

Hello @cjsedwards

  • Was an update needed before doing the push?
  • What were the steps taken that lead up to this error?

SwaySway avatar Jun 19 '20 15:06 SwaySway

Had to revert everything so I'll log the steps to reproduce again:

  1. upgrade amplify cli amplify install -g @aws-amplify/cli
  2. amplify push a) 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

  1. Update all of the hand-spun graphql queries where there are now required inputs
  2. amplify push a) Needs to update lambda function, say 'Y' to continue

Cloudformation error

cjsedwards avatar Jun 19 '20 15:06 cjsedwards

This is related somewhat to another breaking issue #4617

josh-tncarry avatar Jun 19 '20 15:06 josh-tncarry

@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

attilah avatar Jun 19 '20 15:06 attilah

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.

github-actions[bot] avatar May 26 '21 04:05 github-actions[bot]