DVA-C02 Development with AWS Services Practice Question
A developer is using the AWS SDK for Python (Boto3) to upload objects to an S3 bucket. The developer wants to encrypt the objects at rest using server-side encryption with AWS KMS managed keys (SSE-KMS). Which parameter should the developer include in the put_object call?
⚠ Common exam trap
Candidates often confuse the parameter values for SSE-S3 ('AES256') and SSE-KMS ('aws:kms'), or mistakenly think SSEKMSKeyId alone enables KMS encryption without the required ServerSideEncryption parameter.
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
✓
ServerSideEncryption: 'aws:kms'
To use server-side encryption with AWS KMS managed keys (SSE-KMS) when uploading an object to S3 via the put_object call, you must set the ServerSideEncryption parameter to 'aws:kms'. This tells S3 to encrypt the object using a KMS key. Option C is correct because it specifies the exact value required for SSE-KMS 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.
- ✗
SSEAlgorithm: 'AES256'
Why it's wrong here
The parameter name 'SSEAlgorithm' is not a valid or recognized argument for specifying server-side encryption in AWS S3 API calls, such as those made via Boto3. The correct parameter to indicate the desired server-side encryption method is 'ServerSideEncryption'. While 'AES256' is a valid encryption algorithm, providing it under an incorrect parameter name will result in an API error or simply no encryption being applied.
- ✗
SSEKMSKeyId: 'alias/aws/s3'
Why it's wrong here
While 'SSEKMSKeyId' is a valid parameter for specifying a KMS key, it must be used in conjunction with the 'ServerSideEncryption' parameter set to 'aws:kms'. Providing only the 'SSEKMSKeyId' without explicitly enabling SSE-KMS via 'ServerSideEncryption' will not trigger server-side encryption for the object. Furthermore, the key ID itself is optional when using 'aws:kms', as S3 can utilize a default AWS-managed KMS key if none is specified.
- ✓
ServerSideEncryption: 'aws:kms'
Why this is correct
This is the correct parameter and value combination to enable Server-Side Encryption with AWS Key Management Service (SSE-KMS) for objects uploaded to S3. When 'ServerSideEncryption' is set to 'aws:kms', S3 uses a customer master key (CMK) from AWS KMS to encrypt the object data before storing it. This method provides enhanced security and auditability by leveraging KMS for key management, offering more control over the encryption keys than SSE-S3.
- ✗
ServerSideEncryption: 'AES256'
Why it's wrong here
Although 'ServerSideEncryption' is the correct parameter, the value 'AES256' specifically designates Server-Side Encryption with S3-managed keys (SSE-S3). This method uses S3-managed encryption keys and does not integrate with AWS Key Management Service for key management. To enable Server-Side Encryption with AWS KMS (SSE-KMS), which provides greater control and auditability over the encryption keys, the correct value for this parameter must be 'aws:kms'.
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 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 →
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.