DVA-C02 · Question #760
A development team is using an Amazon SNS topic as part of an application. The development team is using an AWS SDK to send messages to the SNS topic. The SNS topic sends an email message to a…
The correct answer is A. Add a new subscription to the topic that will invoke the specified Lambda function. Add a. The correct solution is to add a new subscription to the existing SNS topic that invokes the Lambda function and uses an SNS subscription filter policy to match messages with a title attribute that contains "Important". This approach requires no changes to the application code…
Question
A development team is using an Amazon SNS topic as part of an application. The development team is using an AWS SDK to send messages to the SNS topic. The SNS topic sends an email message to a specific person when each message arrives in the topic. The development team wants a solution to invoke a specific AWS Lambda function if a message that arrives in the topic contains the word “Important” in the title attribute of the JSON message. The solution must not require any changes to the application code. Which solution will meet these requirements?
Options
- AAdd a new subscription to the topic that will invoke the specified Lambda function. Add a
- BAdd a new subscription to the topic that will invoke the specified Lambda function. Add a redrive
- CCreate a new SNS topic that will invoke the specified Lambda function. Add a subscription filter
- DCreate a new SNS topic that will invoke the specified Lambda function. Add a redrive policy that
How the community answered
(28 responses)- A75% (21)
- B4% (1)
- C14% (4)
- D7% (2)
Explanation
The correct solution is to add a new subscription to the existing SNS topic that invokes the Lambda function and uses an SNS subscription filter policy to match messages with a title attribute that contains "Important". This approach requires no changes to the application code, since it leverages SNS filtering at the subscription level.
Community Discussion
No community discussion yet for this question.