Automate VPC Flow Logs Centralization Across Multiple AWS Accounts
A company has a centralized logging account and multiple member accounts. The security team wants to enable VPC Flow Logs for all VPCs across all accounts and centralize the logs in the logging account. The solution must be automated and ensure that new VPCs are automatically included. Which approach should be taken?
Quick Answer
The correct approach is to use an AWS Config rule to detect VPCs without Flow Logs and trigger an AWS Systems Manager Automation runbook to enable them, publishing to a centralized Amazon S3 bucket. This solution works because AWS Config continuously evaluates all VPCs against a custom rule that checks for Flow Logs, and when a non-compliant VPC is found—including any newly created ones—it invokes an Automation runbook that configures the logs and delivers them to a shared S3 bucket in the logging account. On the AWS Certified Solutions Architect Professional SAP-C02 exam, this scenario tests your understanding of automated governance and remediation at scale, often contrasting Config-driven detection with event-driven triggers like CloudTrail or Lambda, which can miss pre-existing resources. A common trap is choosing a solution that only reacts to new VPC creation events, failing to cover existing VPCs. Memory tip: think "Config catches all, Automation fixes all"—the rule evaluates continuously, and the runbook handles the remediation without manual intervention.
⚠ Common exam trap
A common mix-up: candidates choose EventBridge (Option B) because it seems like the most direct way to react to VPC creation, but they overlook the requirement to also handle existing VPCs and the need for continuous compliance monitoring, which AWS Config provides out of the box.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use an AWS Config rule to detect VPCs without Flow Logs and trigger an AWS Systems Manager Automation runbook to enable them, publishing to a centralized Amazon S3 bucket.
AWS Config can continuously evaluate all VPCs against a custom rule that checks for the presence of VPC Flow Logs. When a non-compliant VPC is detected (including newly created ones), Config can trigger an AWS Systems Manager Automation runbook that enables Flow Logs and publishes them to a centralized Amazon S3 bucket in the logging account. This approach is fully automated, covers existing and new VPCs, and centralizes logs without requiring event-driven triggers that might miss resources created before the rule was deployed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use AWS CloudTrail to monitor VPC creation and invoke an AWS Lambda function to enable Flow Logs.
Why it's wrong here
CloudTrail logs API calls but does not directly monitor VPC Flow Logs configuration.
- ✗
Use Amazon EventBridge to capture VPC creation events and trigger an AWS Lambda function to enable Flow Logs.
Why it's wrong here
EventBridge can capture events, but this approach may not be as automatic for existing VPCs.
- ✓
Use an AWS Config rule to detect VPCs without Flow Logs and trigger an AWS Systems Manager Automation runbook to enable them, publishing to a centralized Amazon S3 bucket.
Why this is correct
This automates detection and remediation.
- ✗
Use AWS Trusted Advisor to check VPC Flow Logs configuration and send alerts to an Amazon SNS topic.
Why it's wrong here
Trusted Advisor does not enable Flow Logs automatically.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SAP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company has a multi-account AWS environment with 50 accounts. They need to implement a centralized logging solution for VPC Flow Logs, CloudTrail, and AWS Config logs. The logs must be stored in a central S3 bucket and encrypted with a customer-managed KMS key. Which THREE steps should be taken to meet these requirements?
medium- ✓ A.Create an S3 bucket policy that grants permissions to the CloudTrail and AWS Config service principals from all accounts to write logs.
- B.Use AWS Config aggregator to collect configuration data from all accounts into a central account.
- ✓ C.Configure CloudTrail in each account to send logs to the central S3 bucket.
- ✓ D.Create a customer-managed KMS key with a key policy that allows the CloudTrail and AWS Config service principals to use the key for encryption.
- E.Enable VPC Flow Logs in each account and deliver them to a central CloudWatch Logs group.
Why A: To meet the requirements, three steps are necessary. First, option A: an S3 bucket policy must be created in the central account to grant the CloudTrail and AWS Config service principals from all 50 accounts the necessary permissions (e.g., s3:PutObject) to write logs into the central S3 bucket. Without this policy, cross-account log delivery would fail. Second, option C: CloudTrail must be configured in each account to deliver logs to the central S3 bucket. Each account's CloudTrail trail should specify the central S3 bucket as the destination. Third, option D: a customer-managed KMS key must be created with a key policy that allows the CloudTrail and AWS Config service principals to use the key for encryption. This ensures logs are encrypted at rest using the customer-managed key. Option B (AWS Config aggregator) is not required for S3 storage; it aggregates configuration data but does not store logs in S3. Option E (VPC Flow Logs to CloudWatch Logs) does not meet the requirement of storing logs in a central S3 bucket; VPC Flow Logs can be delivered directly to S3, but the question asks for three steps, and the correct ones are A, C, and D.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.