On my amazon linux ec2 instance, I have the iam-role attached with proper permission, I ran the command $ sudo yum update .
After this I started getting the error Credential named assume-role-with-web-identity not found for command aws s3 ls.
But if I add sudo and run the command sudo aws s3 ls then it works fine.
Please help me to find the issue. Thanks in advance.
Downgraded the version of aws-cli and it got fixed. commands used:
$ curl https://s3.amazonaws.com/aws-cli/awscli-bundle-1.16.312.zip -o awscli-bundle.zip
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/bin/aws
You need to update botocore==1.12.201
pip install botocore==1.12.201
For detail refer here: https://github.com/aws/aws-cli/issues/4371#issuecomment-518792844
Looks like a known issue, take a look at https://github.com/aws/aws-cli/issues/4371