An error occurred AuthFailure when calling the DescribeInstances operation AWS was not able to validate the provided access credentials

0 votes

Hi everyone,

I am getting the bellow error when tried to run AWS CLI commands.

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

How to solve this problem.

Thank You

Feb 24, 2020 in AWS by akhtar
• 38,260 points
25,504 views

2 answers to this question.

0 votes

Hi@akhtar,

If you are using AWS CLI, than you have to set your credentials first. To set credentials use the below command.

$ aws configure

If it is showing the same error, than check your Machine time and sync with standard time.

Hope it will solve your doubt. You can learn better from the AWS training in Chennai.

Thank You

answered Feb 25, 2020 by MD
• 95,460 points
yeah , it works
+1 vote
After checking time and aws configure settings, you may want to go C:\windows\users\, under your username, there is .aws folder, check config and credentials file there, some times there are more than 1 entry which causes conflict.

Delete both the files, and run "aws configure" again, it should fix the issue.

In summary, check below things

1.check the permission of the IAM user and ensure it has administrator access policy attached to it via the group.

2.Check date on local machine, make sure you run aws configure

3. Delete the config & credentials file from the .aws folder and ran aws configure command again
answered Apr 11, 2020 by Arun Kumar
Delete the 2 files in  C/Users/admin/.aws folder. Delete the access key. Create a new access key and configure it again. Also make sure the date and time are appropriate according to the region.
ok, i've done this twice, and its not working,

from awsCLI, I enter

aws ec2 describe-instances

I get this error

An error occurred (AuthFailure) when calling the DescribeInstances operation: AWS was not able to validate the provided access credentials
Hi@PATRICK,

You are getting this error because your credentials are wrong. Check your credentials properly and then try to connect.
I am new to AWS & I m having this same issue in Dec 2021. Can you please elaborate on how to check the credentials? Thanks.

There has to be something else to this.  
I get the same problems. I know it seems simple, but I can login with one host and not another...
Exact same .aws/<files>  I must have copied and pasted the credentials 10 times.  Only pasted them once on the host that works.   The first host is a mac and the second host is debian linux.


❯ md5sum .aws/*
c1b9b46e01a467a191cf97ae512d1782  .aws/config
a7ec15bea8c1c75ff6970c807824625a  .aws/credentials
❯ ssh lkaut@jonsnow "md5sum .aws/*"
c1b9b46e01a467a191cf97ae512d1782  .aws/config
a7ec15bea8c1c75ff6970c807824625a  .aws/credentials



❯ aws ec2 describe-hosts | jq

An error occurred (AuthFailure) when calling the DescribeHosts operation: AWS was not able to validate the provided access credentials
❯ ssh lkaut@jonsnow "aws ec2 describe-hosts"
{
    "Hosts": []
}


❯ aws --version
aws-cli/2.4.19 Python/3.9.10 Darwin/21.2.0 source/arm64 prompt/off

❯ ssh lkaut@jonsnow "aws --version"
aws-cli/2.4.19 Python/3.8.8 Linux/4.19.0-18-amd64 exe/x86_64.debian.10 prompt/off

i do get same erroe while run aws ec2 describe-instances

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP