Courseiva
Development with AWS ServiceshardMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A service publishes order events to SNS. Several consumers need different filtered subsets of events without changing publisher code. What should the developer configure?

⚠ Common exam trap

Many exam-takers confuse client-side filtering (Option B) with server-side filtering, or assume that SQS long polling (Option D) can filter messages, when in fact SNS subscription filter policies are the only native AWS mechanism for server-side message subsetting without publisher changes.

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

SNS subscription filter policies

SNS subscription filter policies allow each consumer to define a JSON policy on their subscription that selectively delivers only messages matching specified attributes (e.g., event type, region). This enables multiple consumers to receive different filtered subsets of the same SNS topic without modifying the publisher's code, as the filtering happens server-side at the SNS service level.

Answer analysis

Option-by-option breakdown

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

  • Separate AWS accounts for each consumer

    Why it's wrong here

    Separate AWS accounts for each consumer would introduce significant architectural complexity and operational overhead without directly addressing the event filtering requirement. While it provides strong isolation, each consumer account would still need to subscribe to the SNS topic and implement its own filtering logic, either post-delivery or through a separate mechanism. This approach does not inherently filter events at the SNS delivery point, making it an inefficient and overly complex solution for simply receiving specific events.

  • Lambda code that discards unwanted events after invocation

    Why it's wrong here

    Lambda code that discards unwanted events after invocation is an inefficient approach because it means every event published to the SNS topic would trigger a Lambda function. The function would then consume resources and incur costs for processing and subsequently discarding events that were never needed by that specific consumer. This method fails to prevent the delivery of irrelevant messages, instead shifting the filtering burden and cost to the consumer's compute layer.

  • SNS subscription filter policies

    Why this is correct

    SNS subscription filter policies are the most direct and efficient solution for this requirement. These policies allow each subscriber to define specific rules based on message attributes or the message body. Only messages that fully match a subscriber's defined filter policy are delivered to that particular endpoint, ensuring consumers receive only the relevant "order events" they need. This prevents unnecessary message delivery and optimizes downstream processing by filtering at the source.

  • SQS long polling only

    Why it's wrong here

    SQS long polling only improves the efficiency of message retrieval from an SQS queue by reducing empty responses and API calls, but it does not provide any message filtering capabilities. If an SQS queue is subscribed to an SNS topic, it will receive *all* messages published to that topic. Consumers polling the queue, even with long polling enabled, would still need to process and discard unwanted events after retrieval, failing to prevent the delivery of irrelevant messages to the queue itself.

About these practice questions

This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.