How do I use Signature Version 4 in ordinary AWS CLI calls?

0

Simple AWS CLI commands like aws ec2 describe-images --region $REGION produce the error AWS was not able to validate the provided access credentials when REGION is one of af-south-1, ap-east-1, eu-south-1, or me-south-1.

This StackOverflow question says that newer regions only support Signature Version 4. How do I choose this in my AWS CLI (v. 2.4.15)? This says that that happens automatically, but clearly it does not.

Notes:

  • This occurs whether I have this ~/.aws/config file or it is missing:
region = us-east-1
output = json
cli_pager=
  • I have no .boto.

  • My clock and timezone seem correct.

已提问 2 年前1118 查看次数
1 回答
1
已接受的回答

Have you activated those regions? Those regions are not enabled by default.

profile pictureAWS
专家
kentrad
已回答 2 年前
  • That is it! How do we tell AWS that this error message is very confusing. After you enable the region, you will see a message you to change settings for STS tokens. The error message is suitable for attempts to use an enabled non-default regin before making that change to STS config.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则