No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Serverless Plugin SNS


This plugin easily subscribes your lambda functions to SNS notifications. If the required SNS-Topics don't exist, they will be created automatically during the deployment.

Note: This plugin supports Serverless 0.5.* (please see previous versions for older sls versions)


cd projectfolder
npm install serverless-plugin-sns
  • add the plugin to your s-project.json file
"plugins": [

Run the Plugin

  • the plugin uses a hook that is called after each deployment of a function
  • you only have to deploy your function as usual sls function deploy
  • add the following attribute to the s-function.json in your functions folder
  "sns": {
    "topic": "your-dev-sns-topic"
  • the topic will be created automatically, if not yet done
  • topicnames can use the following dynamic template-names:

  "sns": {
    "topic": "${project}-sns"

Subscribe a lambda to multiple SNS Topics

  • put an array of topics to the sns attribute
  "sns": [
    {"topic": "your-dev-sns-topic1"},
    {"topic": "your-dev-sns-topic2"}

Next Steps