DOP-C02 Security and Compliance Practice Question
A DevOps engineer is configuring AWS CloudTrail to log all management events across all regions. The engineer wants to ensure that log files are encrypted at rest using a customer-managed KMS key. What is the correct way to achieve this?
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
✓
Specify a KMS key ID in the CloudTrail trail configuration and grant CloudTrail permissions to use the key.
AWS CloudTrail supports encryption at rest using a customer-managed AWS KMS key (SSE-KMS). To achieve this, you must specify the KMS key ID in the CloudTrail trail configuration and grant CloudTrail permissions to use that key via the key policy. Option A is wrong because CloudTrail does not support SSE-C (customer-provided keys); it only supports SSE-S3 or SSE-KMS. Option B is wrong because client-side encryption is not a built-in CloudTrail feature and would require custom implementation. Option C is wrong because SSE-S3 uses S3-managed keys, not a customer-managed KMS key. Therefore, D is the only correct way to encrypt CloudTrail logs with a customer-managed KMS key.
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 SSE-C with a customer-provided key when uploading logs to S3.
Why it's wrong here
SSE-C (server-side encryption with customer-provided keys) is not supported by CloudTrail for log delivery. With SSE-C, you must provide an encryption key with each individual S3 PUT request, but CloudTrail delivers logs automatically as a managed service—it has no interface for you to supply per-object keys on its behalf. Additionally, SSE-C requires you to maintain the key for every subsequent GET/decrypt operation, which is impractical for logs that are continuously written by CloudTrail and later accessed by multiple AWS services such as Athena or detective controls.
- ✗
Enable client-side encryption before delivering logs to S3.
Why it's wrong here
Client-side encryption would require encrypting log files before they are ever sent to S3, but CloudTrail itself generates and delivers the log files—you never upload them, so you have no opportunity to apply client-side encryption at the point of delivery. Even if you tried to set up a process to encrypt files afterward, CloudTrail would already have stored them unencrypted in S3, violating the requirement to encrypt the delivered logs with a customer-managed key. Moreover, native CloudTrail features like the console log viewer and Athena integration rely on the raw log format, which client-side encryption would break.
- ✗
Enable default encryption on the S3 bucket using SSE-S3.
Why it's wrong here
Enabling default SSE-S3 encryption on the S3 bucket does encrypt CloudTrail log files, but it uses S3-managed keys (SSE-S3), not a customer-managed key. The scenario requires the ability to control and manage the encryption key, which SSE-S3 lacks because AWS owns and manages those keys. While CloudTrail will honor the bucket's default SSE-S3 settings, doing so does not meet the customer-managed key requirement—only SSE-KMS with a customer-managed CMK satisfies that control.
- ✓
Specify a KMS key ID in the CloudTrail trail configuration and grant CloudTrail permissions to use the key.
Why this is correct
CloudTrail natively supports SSE-KMS: you configure the trail by specifying a KMS key ID (e.g., arn:aws:kms:region:account:key/key-id) and you must also grant CloudTrail the required permissions via the KMS key policy—specifically kms:GenerateDataKey and kms:Decrypt on the key. This lets CloudTrail encrypt each log file with a customer-managed AWS KMS key, giving you full lifecycle control, auditability, and the ability to disable or rotate the key as needed. Unlike SSE-S3 or SSE-C, this is the only option that both supports automated delivery and uses a customer-managed key.
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 DOP-C02 question from scratch — 1,298 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 →
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.