Interview Prep/DevSecOps/Cloud Security, CIS and Compliance

How do you lock down S3 buckets?

BeginnerConceptCloud Security, CIS and Compliance
Answer
  • Enable S3 Block Public Access at the account level, not just per bucket.
  • Object Ownership set to "Bucket owner enforced" (ACLs disabled, the default for new buckets).
  • Default encryption with SSE-KMS where you need key-level access control.
  • Bucket policy denying non-TLS requests (aws:SecureTransport = false).
  • Versioning, and Object Lock for logs and backups.
aws s3control put-public-access-block --account-id 111122223333 \
  --public-access-block-configuration \
  BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
All DevSecOps questions Roadmap: Policy as code

More on Cloud Security, CIS and Compliance