This rule ensures that S3 public access is restricted at both account and bucket levels.
Rule | S3 public access should be blocked at account and bucket levels |
Framework | Federal Financial Institutions Examination Council (FFIEC) |
Severity | ✔ Medium |
Rule Description:
The rule states that for Federal Financial Institutions Examination Council (FFIEC), the public access to Amazon S3 should be blocked at both the account and bucket levels. This is in order to ensure the security and confidentiality of sensitive data stored in S3 buckets.
Enforcing this rule prevents unauthorized access from the public and helps to comply with FFIEC regulations and guidelines.
Troubleshooting Steps:
Necessary Code:
To block public access at the account level, you can use the following code:
aws s3control put-public-access-block \ --account-id <YOUR_ACCOUNT_ID> \ --public-access-block-configuration "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true"
To block public access at the bucket level, you can use the following bucket policy:
{
"Version": "2012-10-17",
"Id": "BlockPublicAccess",
"Statement": [
{
"Sid": "BlockPublicRead",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
}
}
]
}
Replace
YOUR_ACCOUNT_ID
with your AWS account ID and YOUR_BUCKET_NAME
with the name of your S3 bucket.Remediation Steps:
Block public access at the account level:
Block public access at the bucket level:
Regularly monitor, audit, and review the S3 access controls and permissions:
By following the above steps, you can ensure that S3 public access is blocked at account and bucket levels for FFIEC compliance, reducing the risk of unauthorized access and ensuring the confidentiality of sensitive data.