Verifying AWS Command Line Interface credentials are configured correctly

时间:2018-08-22 13:53:18

标签: amazon-web-services amazon-ec2

I seem to have problems running a command to verify that my credentials are configured correctly and that I can connect to AWS as stated here:https://docs.aws.amazon.com/cli/latest/userguide/tutorial-ec2-ubuntu.html:

When running:

$ aws ec2 describe-regions --output table

I get the following output:

An error occurred (AuthFailure) when calling the DescribeRegions operation: AWS was not able to validate the provided access credentials

What am I missing?

After installing the AWS CLI (on a fedora machine), I ran

$ aws configure

for AWS Access Key ID and AWS Secret Access Key:

  1. I went to AWS website and created an IAM user.
  2. For that user, I have gone to the security credentials tab and
  3. I have created a new Access key, which is key value pair of Access key ID,Secret access key. enter image description here

I have used those values for AWS Access Key ID and AWS Secret Access Key but I keep getting the above error message.

What am I missing? Thanks in advance.

1 个答案:

答案 0 :(得分:1)

您需要传递profile参数。来自AWS的This链接具有更多详细信息