I created a user and policy which allows an IAM user to create an s3 Bucket. I also want that user to have full permissions on the bucket that they create but not on any other existing bucket. How would I go about that?
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutEncryptionConfiguration",
"s3:PutBucketPublicAccessBlock",
"s3:PutBucketPolicy",
"s3:CreateBucket",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "*"
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3::buckets-created-by-this-user/*",
"arn:aws:s3:::buckets-created-by-this-user",
]
}
]
}
New contributor
Hassan Chowdhry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.