AWS Cloud Architecture•Part 4: Storage, Content Delivery & Databases (36 - 50)
S3 Security Mechanisms.
In Simple Words:
- S3 Block Public Access: Account-wide or bucket-level master switch to prevent public exposure.
- Bucket Policies: Resource-based JSON policies controlling actions by specific principals or IP ranges.
- IAM Policies: Identity-based permissions attached to users and roles.
- SSE Encryption: Encryption at rest via SSE-S3 (AES-256) or SSE-KMS.
json
// S3 Bucket Policy enforcing HTTPS (Deny insecure HTTP requests):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EnforceTLS",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"],
"Condition": { "Bool": { "aws:SecureTransport": "false" } }
}
]
}