{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowSSLRequestsOnly",
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<BUCKET_NAME>",
"arn:aws:s3:::<BUCKET_NAME>/*"
],
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
}
},
{
"Sid": "Access-to-specific-VPCE-only",
"Principal": "*",
"Action": [
"s3:GetObject*",
"s3:PutObject*",
"s3:DeleteObject*"
],
"Effect": "Deny",
"Resource": "arn:aws:s3:::<BUCKET_NAME>/*",
"Condition": {
"StringNotEquals": {
"aws:sourceVpce": "<VPC_ENDPOINT_ID>",
"aws:PrincipalTag/network-perimeter-exception": "true",
"aws:PrincipalAccount": [
"<load-balancing-account-id>",
"<third-party-account-a>",
"<third-party-account-b>"
]
},
"BoolIfExists": {
"aws:PrincipalIsAWSService": "false",
"aws:ViaAWSService": "false"
},
"ArnNotLikeIfExists": {
"aws:PrincipalArn": "arn:aws:iam::<my-account-id>:role/aws-service-role/*"
},
"StringEquals": {
"aws:PrincipalTag/data-perimeter-include": "true"
}
}
}
]
}