Nostalgic Primordial Monster

    @dazn/lambda-powertools-sns-client
    TypeScript icon, indicating that this package has built-in type declarations

    1.28.1 • Public • Published

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

    Keywords

    none

    Install

    npm i @dazn/lambda-powertools-sns-client

    DownloadsWeekly Downloads

    2,976

    Version

    1.28.1

    License

    MIT

    Unpacked Size

    12.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • ntog
    • davidrv87
    • gabriela_nowicka
    • criveindazn
    • mrwolny
    • dazn.builder.frontend
    • automation-drone
    • m.bazalik
    • dazn.oss.lambda.powertools
    • dazn.oss