🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@dazn/lambda-powertools-sns-client

Package Overview
Dependencies
Maintainers
6
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dazn/lambda-powertools-sns-client

SNS client wrapper that knows how to forward correlation IDs (captured via @dazn/lambda-powertools-correlation-ids)

latest
npmnpm
Version
1.28.1
Version published
Weekly downloads
819
-6.93%
Maintainers
6
Weekly downloads
 
Created
Source

lambda-powertools-sns-client

SNS client wrapper that knows how to forward correlation IDs (captured via @dazn/lambda-powertools-correlation-ids).

Main features:

  • direct replacement for AWS.SNS client
  • auto-injects correlation IDs into SNS message when you call publish
  • allow correlation IDs to be overriden with publishWithCorrelationIds (useful when processing batch-based event sources such as SQS and Kinesis, where every record has its own set of correlation IDs)

Getting Started

Install from NPM: npm install @dazn/lambda-powertools-sns-client

API

It's exactly the same as the SNS client from the AWS SDK.

const SNS = require('@dazn/lambda-powertools-sns-client')

const publishMessage = async () => {
  const req = {
    Message: JSON.stringify({ message: 'hello sns' }),
    TopicArn: 'my-sns-topic'
  }

  await SNS.publish(req).promise()
}

FAQs

Package last updated on 10 Dec 2020

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