DOP-C02 Security and Compliance Practice Question
A DevOps engineer must ensure that all API calls in an AWS account are logged for compliance. The logs should be stored in an S3 bucket with server-side encryption enabled. Which two services should be used together to meet these requirements?
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
✓
AWS CloudTrail and Amazon S3
AWS CloudTrail is the service that records API activity in an AWS account, and it can deliver those event logs directly to an Amazon S3 bucket, where server-side encryption (SSE-S3 or SSE-KMS) can be enabled to meet the compliance requirement. This combination of CloudTrail and Amazon S3 (option B) satisfies both logging all API calls and storing them encrypted in S3. Option A is wrong because CloudWatch Logs is not the required encrypted S3 storage target for CloudTrail API logs. Option C is wrong because VPC Flow Logs capture IP traffic metadata, not API calls. Option D is wrong because AWS Config records resource configuration changes, not all API calls, and pairing it with CloudTrail does not by itself provide the encrypted S3 log storage.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
AWS CloudTrail and Amazon CloudWatch Logs
Why it's wrong here
CloudTrail logs API calls, but storing them in CloudWatch Logs does not meet the requirement for an S3 bucket with server-side encryption, as CloudWatch Logs is a log management service, not an S3 storage destination. This option is tempting because CloudTrail can send events to CloudWatch Logs for real-time monitoring, which would be correct if the requirement were for alerting or metric filtering rather than encrypted S3 archival.
- ✓
AWS CloudTrail and Amazon S3
Why this is correct
CloudTrail records every API call as management or data events across the account, satisfying the logging requirement, while Amazon S3 provides the durable, server-side-encrypted destination bucket for those trail logs. Together they deliver the auditable, encrypted API activity record compliance demands.
- ✗
Amazon VPC Flow Logs and Amazon S3
Why it's wrong here
VPC Flow Logs capture IP traffic metadata for network interfaces, not API activity such as CreateUser or PutBucketPolicy, so compliance auditing of API calls is unmet. It is tempting because flow logs also land in S3, and would be correct for diagnosing connectivity, rejected traffic or security-group issues.
- ✗
AWS Config and AWS CloudTrail
Why it's wrong here
AWS Config records resource configuration changes and compliance state, not the API calls themselves, so it cannot satisfy the requirement to log every API call. It is tempting because Config also delivers to S3, and would be correct for tracking configuration drift rather than auditing who invoked which API.
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
One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.