How do you centralise logs and security findings across 20 AWS accounts?
IntermediateScenarioMulti-env and multi-account
Answer
Situation read → Investigators shouldn't need to log into 20 accounts. And an attacker in one account must not be able to delete its logs.
What I'd do →
- Organisation CloudTrail to an S3 bucket in a dedicated log archive account, with Object Lock, and data events for sensitive buckets.
- GuardDuty, Security Hub, Config with a delegated administrator in the security account, auto-enabled for new accounts.
- VPC Flow Logs and ALB logs to the central bucket, queried with Athena.
- App logs shipped to a central backend (OpenSearch, Loki or a SaaS) with per-account and per-environment labels.
- Access to the log account limited to the security team, read-only by default.
aws guardduty update-organization-configuration --detector-id abc123 --auto-enable-organization-members ALL
Why → Logs outside the source account survive its compromise, and one place to search speeds up every investigation.
Interview tip → Say "auto-enable for new accounts"; manual enrolment always misses one.
More on Multi-env and multi-account
Design the AWS account structure for a 50-engineer startup that's growing fast.IntermediateHow do you promote the same build from dev to staging to prod?BeginnerBugs keep passing staging and appearing in production. How do you make staging closer to prod?IntermediateHow do you structure Terraform for dev, staging and prod? Workspaces, directories or Terragrunt?IntermediateDevelopers want a preview environment for every pull request. How would you build it?AdvancedHelm values files or Kustomize overlays for per-environment config?Beginner