An AWS Lambda function can be invoked with Amazon SNS notifications. When a publisher publishes a message to an SNS topic and a Lambda function is subscribed to the same SNS topic, that Lambda function is invoked with the payload of a published message. When a publisher publishes a message to an SNS topic, SNS provides the message delivery status to the publisher stating that the message is sent to the Lambda function. The payload message acts as an input parameter for the Lambda function. The function can process the message (payload) as needed.
A prerequisite is to have an SNS topic and a Lambda function.
SNS topic can be configured to execute a Lambda function with the help of the following steps:
- Go to the SNS dashboard, and select Topics from the left-hand side panel; it will display a list of topics, as shown in Figure...