You can use NotPrincipal
to specify the IAM user's ARN.
The ARN is in the format "arn:aws:iam::AWS account ID:user/IAM username"
.
{
"Id": "Policy 3 IamUserAccessControl",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "mybucket01",
"Action": "s3:*",
"Effect": "Deny",
"Resource": ["arn:aws:s3::mybucket",
"NotPrincipal": {
"AWS": [
"arn:aws:iam::123456789012:user/take88" <- Exception IAM User
]
}
}
]
}
© 2024 OneMinuteCode. All rights reserved.