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

已提問 3 年前檢視次數 1918 次
2 個答案
1
已接受的答案

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).

已回答 3 年前
0

YES! THANK YOU

Godd
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南