amplify-category-api
amplify-category-api copied to clipboard
GraphQLAPIDefaultApiKey (AWS::AppSync::ApiKey), Event Type: update, Reason: API key not found:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16.14.2
Amplify CLI Version
12.12.5
What operating system are you using?
Mac OS
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Deleted App Sync API Key that was linked to my Amplify Project
Describe the bug
I have accidentally deleted my App Sync API Key that was linked to my amplify project. I am now attempting to generate a fresh one. Per the documentation, I am adding the following to my parameters.json file:
CreateAPIKey: 0
When I run amplify push it returns this error:
GraphQLAPIDefaultApiKey (AWS::AppSync::ApiKey), Event Type: update, Reason: API key not found:
even though the documentation states here that it will delete the existing API Key, so that I can then add CreateAPIKey: 1 to generate a fresh one.
I've tried amplify pull --restore and amplify push --force and many other different combinations. In the past for expired keys, I have deleted the deployment-state.json file in my S3 bucket, that is not currently showing up. Additionally, in other posts regarding this issue, it is recommended to remove GraphQLAPIIdOutput from the backend-config.js file. However, that key does not appear in my backend-config.js, but it does in amplify-dependant-resources-ref.d.ts
There does not seem to be a clear way for me to generate a fresh api key for my amplify project. Please advice.
Expected behavior
Adding CreateAPIKey: 0 to parameters.json and then running amplify push should remove the API Key. Then updating CreateAPIKey: 1 in parameters.json and running amplify push should generate a fresh one.
Reproduction steps
- Create amplify project
- Delete api key from app sync
- Add
CreateAPIKey: 0toparameters.json - Run
amplify push
Project Identifier
No response
Log output
# Put your logs below this line
Embedded stack arn:aws:cloudformation:us-east-1::stack/stack-name was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to create: [api7XXXXXXXXXResponseXXXXXX, apiXXXXXXResponseXXXXXX]
Additional information
My current cloudformation stack is in a UPDATE_ROLLBACK_COMPLETE state
Before submitting, please confirm:
- [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.