Token Invalid Error when Using AWS CLI

0

Hi, this might be a less intelligent question but I have my AWS account in Isengar, I copied the temporary credential including AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN to CloudDesktop/Mac, it gives me the error "The security token included in the request is invalid" when I use AWS CLI.

AWS
已提問 1 年前檢視次數 2811 次
1 個回答
0
已接受的答案

Here are a few things you can try to troubleshoot the issue:

  1. Check the region: Make sure that the region you're using in the AWS CLI command matches the region of the temporary credentials.

  2. Check the IAM user permissions: Make sure that the IAM user associated with the temporary credentials has the necessary permissions to perform the action you're trying to do.

  3. Check the time on the CloudDesktop/Mac: Make sure the time on the CloudDesktop/Mac is in sync with the time on the Internet. Sometimes, the temporary credentials are time-sensitive, and if the time on your computer is off, the credentials will not work.

  4. Try to use the session token: when you use the AWS CLI command, make sure to use the session token to authenticate as well.

  5. Check the credentials path: Make sure that the credentials are saved in the default location, or if you have defined a path in your AWS CLI configuration file.

已回答 1 年前

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

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

回答問題指南