AWS Certified Developer – Associate (DVA-C02) — Question 374

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?

Answer options

Correct answer: B

Explanation

An Amazon SNS subscription filter policy allows a subscriber, such as an AWS Lambda function, to receive only the specific messages that match the defined filter criteria, preventing unnecessary invocations with zero custom code. Option A is incorrect because Lambda event filtering applies to streaming and polling sources like Amazon SQS or Kinesis, not direct SNS push integrations. Options C and D introduce unnecessary complexity, with Option D requiring custom code that could lead to infinite loops and increased execution costs.