Courseiva
SecurityhardMultiple SelectObjective-mapped

DVA-C02 Security Practice Question

A developer is deploying an application that uses Amazon SQS queues. The messages contain sensitive data that must be encrypted at rest. Which TWO actions should the developer take? (Choose TWO.)

⚠ Common exam trap

Watch out — candidates often think client-side encryption (Option A) is required for encryption at rest, but SQS SSE with KMS provides server-side encryption at rest without needing to modify the application code, making client-side encryption redundant for this specific requirement.

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

Configure the SQS queue to use a customer managed KMS key.

Configuring an SQS queue to use a customer managed KMS key gives you control over the key lifecycle, including rotation and access policies, while still leveraging AWS KMS for server-side encryption. Option D is also correct because enabling server-side encryption (SSE) for SQS using AWS KMS encrypts messages at rest automatically, without requiring client-side changes. Together, these two actions ensure that sensitive data in SQS messages is encrypted at rest using KMS, meeting the requirement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Encrypt the messages client-side before sending to SQS.

    Why it's wrong here

    Client-side encryption would protect data in transit and at rest outside SQS, but the requirement is specifically for encryption at rest *within SQS*. SQS’s server-side encryption (SSE) using KMS handles this automatically; client-side encryption is unnecessary and adds complexity. It is tempting because client-side encryption is a valid approach for end-to-end confidentiality when the service itself cannot be trusted to encrypt, but here SQS supports native at-rest encryption, making client-side encryption an overengineered solution that does not satisfy the stated requirement.

  • Store the messages in an S3 bucket with default encryption instead of using SQS.

    Why it's wrong here

    Storing messages in an S3 bucket fundamentally alters the application's architecture from a message queueing system to an object storage solution. Amazon SQS provides managed queueing semantics like message visibility timeouts, FIFO ordering, and dead-letter queues, which are essential for decoupling microservices and reliable asynchronous communication. S3, while offering default encryption for objects at rest, lacks these queueing features and would require significant custom development to replicate SQS's functionality, making it an unsuitable replacement for a messaging application.

  • Configure the SQS queue to use a customer managed KMS key.

    Why this is correct

    Configuring an SQS queue to use a Customer Managed Key (CMK) from AWS Key Management Service (KMS) is a correct approach to enable server-side encryption (SSE) for messages at rest. This option provides enhanced control over the encryption key, allowing developers to define specific key policies, manage key rotation schedules, and audit all key usage through AWS CloudTrail. SQS will then use this CMK to encrypt messages upon receipt and decrypt them automatically when consumers retrieve them, meeting the requirement for encryption at rest.

  • Enable server-side encryption (SSE) for the SQS queue using AWS KMS.

    Why this is correct

    Enabling server-side encryption (SSE) for an SQS queue using AWS KMS is the primary and most straightforward method to ensure messages are encrypted at rest within the SQS service. When SSE is activated, SQS transparently integrates with AWS KMS to handle the encryption of message bodies and metadata before they are persisted, and automatically decrypts them for authorized consumers. This built-in capability protects sensitive data stored in the queue without requiring any application-level encryption logic, simplifying development and enhancing security.

  • Use AWS CloudHSM to generate and store the encryption keys.

    Why it's wrong here

    AWS CloudHSM provides dedicated hardware security modules (HSMs) for generating and storing encryption keys, offering FIPS 140-2 Level 3 validated security. However, Amazon SQS Server-Side Encryption (SSE) is natively integrated with AWS Key Management Service (KMS) for key management, not directly with CloudHSM. While KMS can optionally use CloudHSM as a custom key store, SQS's direct SSE integration is with KMS itself. Therefore, attempting to use CloudHSM directly for SQS message encryption at rest is not a supported or feasible configuration.

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 724 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 →

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.