Subscribing a Lambda function to an Amazon SNS topic - Amazon Simple Notification Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Subscribing a Lambda function to an Amazon SNS topic

  1. Sign in to the Amazon SNS console.

  2. On the navigation panel, choose Topics.

  3. On the Topics page, choose a topic.

  4. In the Subscriptions section, choose Create subscription.

  5. On the Create subscription page, in the Details section, do the following:

    1. Verify the chosen Topic ARN.

    2. For Protocol choose Amazon Lambda.

    3. For Endpoint enter the ARN of a function.

    4. Choose Create subscription.

When a message is published to an SNS topic that has a Lambda function subscribed to it, the Lambda function is invoked with the payload of the published message. For information about how to use Amazon Lambda with Amazon SNS, including a tutorial, see Using Amazon Lambda with Amazon SNS.