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.