question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document how to update AppSync API key

See original GitHub issue
$ amplify -v
1.6.6

It seems like the default DX if you add a GraphQL API w/ API key auth is that amplify push stops working after 7 days. I can create a new API key in AppSync Settings page, but I’m not finding documentation about how to give the new key to amplify.

Alternatively, if amplify auto generated new keys to use, that’d be better. Looks like was added with #446, but it’s either not working or not enabled by default.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:30 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
ph0ph0commented, Nov 15, 2019

@kaustavghosh06 Does anyone have any updates on a solid fix for this please? I have tried all of the suggestions on this thread as well as the reference above (#954) and none of them have worked. The only solution that I have at the minute is to completely delete my entire amplify setup every week and then recreate it. Obviously this is less than ideal, and will not work at all in production. Does anyone know if AWS are thinking of fixing this issue? Surely this should be top of the list, as it is a huge flaw in the system and makes Amplify completely unusable?

8reactions
mudassir0909commented, Aug 28, 2020

https://docs.amplify.aws/cli/graphql-transformer/config-params#createapikey

As mentioned here, I had to set CreateAPIKey to 0, do a push, and then set it back to 1 and push again. This worked!

The property should be added in amplify/backend/api/<project-name>/parameters.json

parameters json — serverless 2020-08-28 23-01-09
Read more comments on GitHub >

github_iconTop Results From Across the Web

UpdateApiKey - AWS AppSync
Updates an API key. You can update the key as long as it's not deleted.
Read more >
update-api-key — AWS CLI 2.9.5 Command Reference
Updates an API key. You can update the key as long as it's not deleted. See also: AWS API Documentation. Synopsis¶. update ......
Read more >
Rotate AppSync API Key in an AWS Amplify project - cloudxs
Content · Adjusting Amplify configuration of the frontend · Change hosting · Prevent Amplify from creating the API key by itself · Lambda...
Read more >
Amplify API GraphQL - Unable to change local API Key with ...
To update my API key, I used to ...
Read more >
API (GraphQL) - Configure authorization modes - JavaScript
Each AppSync API is set with a default authorization mode. AWS AppSync also supports multiple authorization modes on a single API enabling you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found