The audit team requires that every S3 bucket in the org is encrypted and not public. How do you enforce and detect?
IntermediateScenarioIAM, Organizations and Multi-Account
Answer
Situation read → Combine preventive controls (SCP, account settings) and detective controls (Config).
What I'd do →
- Turn on S3 Block Public Access at the account level via
aws s3control put-public-access-blockand enforce through an SCP denying its removal - Enable default SSE-S3 or SSE-KMS (default on since 2023) and add a bucket-policy or SCP that denies
s3:PutObjectwithout the expected encryption header when KMS is required - Deploy Config managed rules
s3-bucket-public-read-prohibitedands3-bucket-server-side-encryption-enabledthrough an org conformance pack - Auto-remediate with SSM Automation
Why → Prevent what you can, detect the rest; either alone leaves gaps.
Interview tip → Mention Security Hub CSPM standards for an aggregated score.
More on IAM, Organizations and Multi-Account
A developer needs read-only access to one S3 bucket from their laptop. How do you grant it without creating long-lived access keys?BeginnerAn EC2 application needs to write to DynamoDB. Where do the credentials come from?BeginnerSecurity wants to know who deleted a production S3 bucket yesterday. How do you find out?BeginnerYou must stop anyone in a member account from disabling CloudTrail, even account admins. What do you use?BeginnerA cross-account role assumption fails with AccessDenied even though the target role trusts the source account. What do you check?IntermediateDesign access for a CI pipeline in GitHub Actions to deploy to AWS without storing AWS keys in GitHub.Intermediate