Courseiva
SecurityeasyMultiple ChoiceObjective-mapped

DVA-C02 Security Practice Question

A developer is using the AWS CLI to upload a file to an S3 bucket with server-side encryption. The bucket is configured with default encryption (SSE-S3). The developer wants to ensure the object is encrypted with SSE-KMS instead. What should the developer do?

⚠ Common exam trap

Candidates often assume bucket default encryption always applies to all objects, but in reality, request-level encryption parameters take precedence over bucket defaults, and the developer must explicitly specify SSE-KMS to override SSE-S3.

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

Use the --sse aws:kms parameter when uploading

The developer must explicitly specify the server-side encryption method at the time of upload using the `--sse aws:kms` parameter in the AWS CLI. This overrides the bucket's default SSE-S3 encryption, ensuring the object is encrypted with SSE-KMS. Without this parameter, the object inherits the bucket's default encryption (SSE-S3), regardless of any other settings.

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 the --kms-key-id parameter with a KMS key ARN

    Why it's wrong here

    This option is incorrect because the --kms-key-id parameter specifies *which* AWS KMS key to use for encryption, but it does not *enable* Server-Side Encryption with AWS KMS (SSE-KMS) itself. To activate SSE-KMS, the --sse aws:kms parameter must also be explicitly included in the AWS CLI command. If --sse aws:kms is omitted, the --kms-key-id will be ignored, and the upload will proceed either unencrypted or with the bucket's default encryption, if configured.

  • Use the --sse aws:kms parameter when uploading

    Why this is correct

    This is the correct action. To ensure a file is encrypted with Server-Side Encryption with AWS KMS (SSE-KMS) during an AWS CLI upload, the --sse aws:kms parameter must be explicitly specified. This parameter instructs S3 to use KMS for encryption. If a specific KMS key is desired, it can be combined with the --kms-key-id parameter; otherwise, S3 will use the default AWS managed key for S3 in the account.

  • No action needed; the bucket default encryption will apply

    Why it's wrong here

    This option is incorrect because while S3 buckets can have default encryption configured, this default only applies if the PUT request *does not* specify any encryption headers. If the developer intends to explicitly use SSE-KMS, relying solely on bucket default encryption is insufficient. The bucket's default might be configured for SSE-S3, or not configured at all, or the developer might want to override it with a specific KMS key.

  • Change the bucket policy to require SSE-KMS

    Why it's wrong here

    While a bucket policy can be configured to *enforce* that all uploads use SSE-KMS by denying requests that lack the appropriate encryption headers, simply changing the policy does not *perform* the encryption. The developer still needs to explicitly include the --sse aws:kms parameter (and optionally --kms-key-id) in their AWS CLI upload command to satisfy the policy requirement and ensure the file is encrypted as intended. The policy acts as a guardrail, not an automatic encryption mechanism.

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

One of 724 original DVA-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DVA-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 DVA-C02 exam.