1.28.1 • Published 3 years ago

@dazn/lambda-powertools-sns-client v1.28.1

Weekly downloads
1,859
License
MIT
Repository
-
Last release
3 years ago

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()
}
1.28.1

3 years ago

1.28.0

3 years ago

1.26.0

4 years ago

1.24.1

4 years ago

1.24.0

4 years ago

1.23.2

4 years ago

1.23.1

4 years ago

1.23.0

4 years ago

1.22.1

4 years ago

1.22.0

4 years ago

1.21.1

4 years ago

1.12.0

5 years ago

1.8.2

5 years ago

1.8.0

5 years ago