Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how re-login to a aws token expired

Error when retrieving token from sso: Token has expired and refresh failed

How can i refresh my token when

aws sso session login --sso-session prod

does not work

it gets me the next: `(base) kigo_max@hp-ubuntu-max:~$ aws sso session login --sso-session prod

usage: aws [options] [ ...] [parameters] To see help text, you can run:

aws help aws help aws help

aws: error: argument operation: Invalid choice, valid choices are:

get-role-credentials | list-account-roles
list-accounts | logout
login | help

`

like image 248
Maximiliano López Vázquez Avatar asked Dec 06 '25 17:12

Maximiliano López Vázquez


1 Answers

There is no session as a subcommand of the aws sso command.

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sso/index.html

Use this

aws sso login --profile prod

https://docs.aws.amazon.com/cli/latest/userguide/sso-using-profile.html#sso-using-profile-sign-in

like image 64
NaNash Avatar answered Dec 10 '25 12:12

NaNash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!