1 Answer
- Newest
- Most votes
- Most comments
1
Certain IAM users can operate from the console by setting the following bucket policy.
EC2, etc., access should be denied unless it is through a VPC endpoint.
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-principalarn
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::S3 bucket Name",
"arn:aws:s3:::S3 bucket Name/*"
],
"Condition": {
"StringNotEquals": {
"aws:SourceVpce": "VPC Endpoint ID",
"aws:PrincipalArn": "IAM User ARN"
}
}
}
]
}