InterviewHubPRO
Section Overview
Q39

Question 39 of 65

Part 4: Storage, Content Delivery & Databases (36 - 50)

60%
AWS Cloud Architecture•Part 4: Storage, Content Delivery & Databases (36 - 50)

S3 Security Mechanisms.

In Simple Words:

  1. S3 Block Public Access: Account-wide or bucket-level master switch to prevent public exposure.
  2. Bucket Policies: Resource-based JSON policies controlling actions by specific principals or IP ranges.
  3. IAM Policies: Identity-based permissions attached to users and roles.
  4. 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" } }
    }
  ]
}