🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

serverless-plugin-sns-delivery-policy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-sns-delivery-policy

Serverless SNS Delivery Policy plugin - Allows for configuring the delivery policy of the SNS/Lambda event subscription

0.0.3
latest
Source
npm
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

Serverless SNS Delivery Policy Plugin

This plugin will configure your SNS events with the Delivery Policy option, which the serverless system does not natively support.

Note: Requires Serverless v0.5.0.

Setup

Just add a "deliveryPolicy" block to your SNS event:

"events": [
  {
    "name": "alertsSNS",
    "type": "sns",
    "config": {
      "topicName": "${alertsSNSTopicName}",
      "deliveryPolicy": {
        "healthyRetryPolicy": {
          "minDelayTarget": 10,
          "maxDelayTarget": 30,
          "numRetries": 10,
          "numNoDelayRetries": 0,
          "numMinDelayRetries": 3,
          "numMaxDelayRetries": 7,
          "backoffFunction" : "linear"
        }
      }
    }
  }
],

For a little (fairly barren) documentation of the deliveryPolicy structure, see http://docs.aws.amazon.com/sns/latest/dg/json-formats.html

Setup

  • Install the plugin in the root of your Serverless Project:
npm install serverless-plugin-sns-delivery-policy --save-dev
  • Add the plugin to the plugins array in your Serverless Project's s-project.json, like this:
plugins: [
    "serverless-plugin-sns-delivery-policy"
]

Now, any time you deploy an event to AWS, serverless-plugin-sns-delivery-policy will automatically configure the SNS event with your Delivery Policy settings.

Keywords

serverless framework plugin

FAQs

Package last updated on 23 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts