Courseiva
Design Solutions for Organizational ComplexitymediumMultiple SelectObjective-mapped

Collecting VPC Flow Logs from Multiple Accounts into a Single S3 Bucket

A company is using AWS Organizations with a centralized logging account. They want to collect VPC Flow Logs from all member accounts into a single S3 bucket in the logging account. Which TWO steps are required to achieve this?

Quick Answer

The answer is to configure the bucket policy to include a condition that the principal is the VPC Flow Logs service and to grant s3:PutObject permissions to the member accounts. This works because VPC Flow Logs are published by the service principal, not by the member account’s IAM user or role, so the bucket policy must explicitly allow the vpc-flow-logs.amazonaws.com service principal to write objects into the central S3 bucket. On the AWS Certified Solutions Architect Professional SAP-C02 exam, this scenario tests your understanding of cross-account service-to-service permissions, where the common trap is to assume you need Resource Access Manager (RAM) or SCPs—neither of which apply here, as SCPs cannot grant permissions and RAM is unnecessary when a bucket policy suffices. A useful memory tip: remember that VPC Flow Logs write as the service itself, so your bucket policy must welcome the service principal, not just the account.

⚠ Common exam trap

Test-takers frequently think SCPs or IAM roles in member accounts are sufficient for cross-account S3 writes, but the bucket policy is the only mechanism that authorizes the VPC Flow Logs service principal from another account to write objects.

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

Create a bucket policy in the logging account that grants the member accounts permission to write flow logs.

A bucket policy in the logging account is required to grant cross-account permissions for VPC Flow Logs delivery. Without this policy, the VPC Flow Logs service in member accounts cannot write to the centralized S3 bucket, even if the member account has its own IAM permissions. Option C is correct because the bucket policy must include a condition that restricts the principal to the VPC Flow Logs service (e.g., `aws:SourceArn` or `aws:SourceAccount`) to prevent unauthorized writes from other services or accounts.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a bucket policy in the logging account that grants the member accounts permission to write flow logs.

    Why this is correct

    Bucket policy allows cross-account writes.

  • Attach an SCP to the logging account that allows PutObject to the bucket.

    Why it's wrong here

    SCPs are for principals, not for granting permissions to resources.

  • Configure the bucket policy to include a condition that the principal is the VPC Flow Logs service.

    Why this is correct

    This ensures only flow logs can write to the bucket.

  • Use AWS Resource Access Manager (RAM) to share the bucket with member accounts.

    Why it's wrong here

    RAM is for sharing resources like subnets, not S3 buckets for writing.

  • Attach an SCP to the member accounts that allows them to create flow logs.

    Why it's wrong here

    SCP can allow, but bucket policy is needed for cross-account writes.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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 →

How Courseiva writes practice questions · Editorial policy

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. The security team wants to centrally manage VPC flow logs for all accounts. They already have a centralized logging account. What is the MOST scalable solution?

hard
  • A.Deploy a third-party log collector agent on each EC2 instance.
  • B.Configure AWS Transit Gateway to aggregate flow logs.
  • C.Use a CloudFormation StackSet to deploy VPC Flow Logs to an S3 bucket in the central account using bucket policies.
  • D.Enable VPC Flow Logs in each account and publish to a CloudWatch Logs group in the central account.

Why C: Using a CloudFormation StackSet allows you to deploy VPC Flow Logs consistently across multiple accounts and regions, publishing them to a centralized S3 bucket in the logging account. Bucket policies grant cross-account write access, making this approach highly scalable without per-account agent management or CloudWatch Logs cross-account limitations.

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.