Home > Blockchain >  Aws AppSync token expiry date
Aws AppSync token expiry date

Time:12-02

I am using AWS Amplify datastore. App-sync token in internally used by this service. Currently, App-sync token is expired so I changed expired date from Appsync / Settings / API keys. But this allow to edit expired date maximum for next one year.

Is their any why to set token expiry date forever or more then 1 year? because my client don't want that after one year we need to again change expiry date.

CodePudding user response:

AppSync API key docs: API keys are configurable for up to 365 days, and you can extend an existing expiration date for up to another 365 days from that day.

You can extend the expiry of an existing key programatically, but if you try to update the expiry (seconds since epoch) beyond one year, you will get the following error: The API key expiration must be set to a value between 1 and 365 days.

aws appsync update-api-key --api-id xxxxxxxx --id da2-xxxxxxxx --expires 1669880629

You could automate key updates with a lambda triggered by an EventBridge cron schedule rule.

  • Related