Reputation: 11
In S3, can we create an IAM user and give it rights to create other IAM users?
Upvotes: 1
Views: 85
Reputation: 306
The policy specified by Maverick in the above answer can create a new user and create access and secret keys for the user. However, it cannot create or attach any policies to the created user. So, I'm adding the required permission to create and attach IAM and inline policies for IAM users.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:AttachUserPolicy",
"iam:CreateAccessKey",
"iam:CreatePolicy",
"iam:CreateUser",
"iam:PutUserPolicy"
],
"Resource": "*"
}
]
}
Refer this for more information about actions related to Identity and Access Management (IAM) in AWS: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html
Upvotes: 1
Reputation: 156
S3
and IAM
are 2 different AWS
services. S3
has nothing to do with IAM
user creation.
I'll go ahead and assume that you meant creating an IAM user with permissions to create other users
.
Yes, it is possible to do so. You just have to attach a suitable IAM
policy to the newly created user. Following policy should get you started.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:CreateUser",
"iam:CreateAccessKey"
],
"Resource": "*"
}
]
}
Upvotes: 1