nerdexam
AmazonAmazon

DVA-C02 · Question #540

DVA-C02 Question #540: Real Exam Question with Answer & Explanation

The correct answer is A: Use long polling to query the queue for new messages.. Long polling and message batching together minimize SQS API call costs by reducing empty responses and retrieving multiple messages per request.

Submitted by tom_us· Mar 5, 2026Development with AWS Services

Question

A developer is building an application that will process messages from an Amazon Simple Queue Service (Amazon SQS) standard queue. The application needs to process the messages in an Amazon Elastic Container Service (Amazon ECS) task. Which actions will result in the MOST cost-effective processing of the messages? (Choose two.)

Options

  • AUse long polling to query the queue for new messages.
  • BUse short polling to query the queue for new messages.
  • CUse message batching to retrieve messages from the queue.
  • DUse Amazon ElastiCache to cache messages in the queue.
  • EUse an SQS FIFO queue to manage the messages.

Explanation

Long polling and message batching together minimize SQS API call costs by reducing empty responses and retrieving multiple messages per request.

Common mistakes.

  • B. Short polling returns immediately even when the queue is empty, generating frequent billable API calls with no messages, making it the most expensive polling strategy.
  • D. ElastiCache is an in-memory caching service and cannot store or retrieve SQS messages; SQS messages are only accessible through SQS APIs.
  • E. SQS FIFO queues provide ordering and deduplication guarantees but cost more per API call than standard queues and do not reduce the number of API calls made.

Concept tested. SQS long polling and batch retrieval cost optimization

Reference. https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 PracticeBrowse All DVA-C02 Questions