DOP-C02 SSE-KMS Practice Question
A company's security policy requires that all data stored in Amazon S3 must be encrypted at rest using server-side encryption with customer-managed keys (SSE-KMS). When uploading an object via the AWS CLI, which parameter must be included to enforce 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
✓
--server-side-encryption aws:kms
The correct parameter to enforce server-side encryption with AWS KMS (SSE-KMS) when uploading an object via the AWS CLI is --server-side-encryption aws:kms, which corresponds to option D. Option A is incorrect because --kms-key-id only specifies the key ID but does not enable encryption by itself; it must be combined with --server-side-encryption aws:kms. Option B is incorrect because --sse AES256 is not a valid AWS CLI parameter; the correct parameter for SSE-S3 is --server-side-encryption AES256. Option C is incorrect because --encryption is not a valid AWS CLI parameter for server-side encryption.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
--kms-key-id <key-id>
Why it's wrong here
This parameter identifies the specific AWS KMS customer master key to use for encryption, but it does not by itself enable SSE-KMS. If you specify only `--kms-key-id` without `--server-side-encryption aws:kms`, S3 will not encrypt the object with KMS; the parameter is ignored or returns an error depending on context. You need both flags to enforce SSE-KMS with a custom CMK.
- ✗
--sse AES256
Why it's wrong here
This CLI parameter appears in some AWS service commands, but for S3, `--sse AES256` maps to SSE-S3 (Amazon S3-managed keys), which does not use AWS KMS. The security policy requiring SSE-KMS specifically necessitates the `aws:kms` value, so `AES256` does not satisfy the requirement. Also, note that the correct flag for S3 is `--server-side-encryption`, not `--sse`.
- ✗
--encryption aws:kms
Why it's wrong here
The AWS CLI does not accept `--encryption` as a parameter for S3 `cp` or `put-object` operations; the correct parameter is `--server-side-encryption`. Even though `aws:kms` is the right value for SSE-KMS, the flag name is invalid and results in an "Unknown options" error. You must use `--server-side-encryption aws:kms` to enable SSE-KMS during upload.
- ✓
--server-side-encryption aws:kms
Why this is correct
This is the S3 CLI parameter that explicitly requests server-side encryption with AWS KMS (SSE-KMS). Setting the value to `aws:kms` instructs S3 to use a customer master key (CMK) for encrypting the object at rest. When combined with `--kms-key-id`, it allows specifying a particular KMS key, but the presence of `--server-side-encryption aws:kms` alone satisfies the encryption requirement.
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,013 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.