Edit S3 Bucket Policies
Last updated
{
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::your-bucket/*",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": "192.0.2.0/24"
}
}
}
]
}{
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::con-id:user/user-name"
},
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::your-bucket/*"
}
]
}{
"Statement": [
{
"Effect": "Deny",
"Principal": {
"AWS": "arn:aws:iam::123456789012:user/user-ke2"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::bucket-2",
"arn:aws:s3:::bucket-2/*"
]
}
]
}