How to filter SNS messages for Lambda with least effort?
A developer is creating an AWS Lambda function that is invoked by messages to an Amazon Simple Notification Service (Amazon SNS) topic. The messages represent customer data updates from a customer relationship management (CRM) system The developer wants the Lambda function to process only the messages that pertain to email address changes. Additional subscribers to the SNS topic will process any other messages. Which solution will meet these requirements in the LEAST development effort?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The question tests the distinction between SNS subscription filter policies and Lambda event filtering, with the trap being the incorrect assumption that Lambda event filtering supports SNS triggers.
To process specific SNS messages in a Lambda function with minimal code, use SNS subscription filter policies. The community confirms this is the standard approach for message routing without custom logic.
Choosing Option A is a frequent error because Lambda event filtering does not support Amazon SNS as an event source.
Community Discussion (5 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
SNS subscription filter policies allow you to define attribute-based filtering rules directly on the subscription. This ensures the Lambda function is only invoked for messages matching the criteria (email address changes), requiring no code changes and thus the least development effort.Why the Other Options Are Wrong
Option A is incorrect because Lambda event filtering is not supported for SNS event sources. Option C adds unnecessary operational overhead by introducing an SQS queue. Option D requires writing custom logic to inspect and republish messages, which significantly increases development effort.Community Comment Notes
Community members emphasized that Option A is invalid due to the lack of support for SNS in Lambda event filtering. Comments also reinforced that SNS filter policies are the intended, native solution for this specific use case.Official Reference
Exam Strategy
When you see 'least development effort' for message routing, prioritize service-level configurations like filter policies over writing code. Always verify which event sources support Lambda event filtering to avoid selecting invalid options.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →