Amplify CLI pull command - NotAuthorizedException

0

Hi there,

I just tried to start working on my project again after the holidays.
I try to run

amplify pull --appId [..appId..] --envName staging

The command aborts with the following error:
⠹ Fetching updates to backend environment: staging from the cloud.Failed to refresh tokens.
Failed to get credentials.
NotAuthorizedException: Refresh Token has expired

code: 'NotAuthorizedException',
time: 2021-01-10T21:28:06.763Z,
requestId: 'ea44f142-2471-4fe2-9d26-546e770a5b1d',
statusCode: 400,
retryable: false,
retryDelay: 75.62772473140802

As a newcomer to AWS and Amplify, i am quite lost here. It was working perfectly during December, the pull command always reliably fetched the changes.

Any hints highly appreciated.
Best,
Birger

asked 3 years ago1900 views
2 Answers
1
Accepted Answer

You should try logging out

amplify logout --appId appIDHere
✔ Do you want to logout from all sessions? (y/N) · true
Logged out globally.

Then reconfigure:

amplify configure --appId appIDHere --envName staging
This will take you to admin console and ask if you want to login via the cli (you do).

answered 3 years ago
0

YES! THANK YOU

Godd
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions