Policy used :
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"iam:*AccessKey*"
],
"Effect": "Allow",
"Resource": [
"arn:aws:iam::account#:user/user1"
]
}
]
}
What does the policy do : Allows user to change to manage his own access keys .
What have I tried till now
- Attached the above policy to the user
- Tried logging with the user name and clicked on IAM and clicked on rotate your access keys and manage your access keys .
- The error message comes up and doesnt allow the user to change the access keys
- Error message is as follows:
You need permissions You do not have the permission required to perform this operation. Ask your administrator to add permissions. Learn more
User: arn:aws:iam::account#:user/user1 is not authorized to perform: iam:ListUsers on resource: arn:aws:iam::account#:user/
iam:ListUserspermission to use the interface. They could rotate keys via the AWS Command-Line Interface (CLI) without that permission. Also, question mentions policy variables, but your policy doesn't show any variable. I presume you are referring to: IAM Policy Variables Overview - John Rotenstein