DOP-C02 Monitoring and Logging Practice Question
A DevOps engineer is configuring a centralized logging solution using Amazon CloudWatch Logs. They need to ensure that logs from multiple AWS accounts are aggregated into a single CloudWatch Logs account. Which approach meets this requirement?
⚠ Common exam trap
Test-takers frequently confuse the CloudWatch Logs destination (which is a cross-account subscription mechanism) with directly writing to a Kinesis stream or using PutLogEvents across accounts, both of which are not supported for cross-account log aggregation.
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 subscription filter in each account that delivers log events to a CloudWatch Logs destination in the central account.
CloudWatch Logs supports cross-account subscription filters that can deliver log events to a CloudWatch Logs destination in a central account. The destination is a logical resource that points to a Kinesis Data Stream or Lambda function in the central account, and the source account creates a subscription filter that sends matching log events to that destination. This allows centralized aggregation without requiring each account to manage separate streaming infrastructure.
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 Amazon Kinesis Data Firehose in each account to stream logs to a central Amazon S3 bucket, then use Amazon Athena to query.
Why it's wrong here
This works but is not the most direct or real-time solution; cross-account subscriptions are designed for this.
- ✓
Create a subscription filter in each account that delivers log events to a CloudWatch Logs destination in the central account.
Why this is correct
Cross-account subscription filters allow real-time log aggregation from multiple accounts to a central account.
- ✗
Set up a cross-account destination using an Amazon Kinesis Data Streams stream in the central account and configure each account to send logs to that stream.
Why it's wrong here
This is a valid approach but not the most straightforward; CloudWatch Logs subscription filters can directly send to a cross-account destination without Kinesis.
- ✗
Configure each application to use the PutLogEvents API to send logs directly to the central account's log group.
Why it's wrong here
PutLogEvents requires the log stream to be in the same account; cross-account writes are not allowed.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 251-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on DOP-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 is using Amazon CloudWatch Logs to collect logs from its containerized applications running on Amazon ECS Fargate. The DevOps engineer wants to centralize logs from multiple services into a single CloudWatch Logs log group. They currently have a log group per service. Which approach minimizes operational overhead and cost?
hard- A.Use Amazon Kinesis Data Firehose to stream logs from each log group to Amazon S3 and then to a central CloudWatch Logs group.
- ✓ B.Create a CloudWatch Logs subscription filter on each service log group to stream matching log events to a central log group.
- C.Export each log group to Amazon S3 and use Amazon Athena to query across all exported logs.
- D.Modify the application logging configuration in each container to send logs to a single log group and log stream per container.
Why B: The correct approach because CloudWatch Logs subscription filters can be used to forward log events from multiple source log groups to a central destination. Although subscription filters cannot send logs directly to another CloudWatch Logs group, they can deliver to a Lambda function, which then writes the logs into the central log group. This pattern uses native CloudWatch and Lambda, avoiding the overhead and cost of additional services like Kinesis or S3. It is a common minimal-overhead solution for centralizing logs from multiple ECS services.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-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 DOP-C02 exam.