Which solution will meet these requirements in the LEAST development effort?
Use Lambda event filtering to allow only messages that are related to email address changes to invoke the Lambda function.
Use an SNS filter policy on the Lambda function subscription to allow only messages that are related to email address changes to invoke the Lambda function.
Subscribe an Amazon Simple Queue Service (Amazon SQS) queue to the SNS topic. Configure the SQS queue with a filter policy to allow only messages that are related to email address changes.Connect the SQS queue to the Lambda function.
Configure the Lambda code to check the received message. If the message is not related to an email address change, configure the Lambda function to publish the message back to the SNS topic for the other subscribers to process.
Explanations:
Lambda event filtering is not directly supported for SNS as an event source, so this option would not work in this case.
SNS filter policies can filter messages based on content before invoking the Lambda function, allowing only messages about email address changes to trigger the function. This approach requires the least development effort.
Although feasible, using an SQS queue introduces unnecessary complexity and resources, requiring additional configuration to connect SQS to Lambda.
Configuring the Lambda to republish unneeded messages back to SNS is inefficient and can create unnecessary processing overhead, making it more complex than necessary.