Interview Prep/Terraform/Security, Secrets and Access

How do you stop public S3 buckets?

BeginnerProductionSecurity, Secrets and Access
Answer

Defense in depth: the module always creates aws_s3_bucket_public_access_block with all four flags true, account-level Block Public Access in the baseline, an SCP denying s3:PutBucketPublicAccessBlock changes and a Checkov/OPA check in CI. Exceptions (static websites) are explicit and approved.

All Terraform questions Roadmap: Terraform in production

More on Security, Secrets and Access