1.8.1 • Published 3 years ago

@pidz-developer/aws-sns-publish-message-wrapper v1.8.1

Weekly downloads
138
License
ISC
Repository
-
Last release
3 years ago

SNS

A wrapper for AWS SNS, for adding the EventStore topic for DDD.

Usage

import * as SnsPublisher from '@pidz-developer/aws-sns-publish-message-wrapper';

const snsPublisher = new SnsPublisher({
    accountId: '12345678910', // optional
    region: 'eu-central-1', // optional
});

When no accountId is set it uses process.env.ACCOUNT_ID, for region it uses process.env.REGION or process.env.AWS_DEFAULT_REGION.

publish(topicName, message)

Publishes a message to a SNS topic (and EventStore). The message body is converted to JSON.

const body = {
    action: 'workerActivatedEvent',
    user_id: '123456789',
};

await snsPublisher.publish('my-topic', body);
1.8.1

3 years ago

1.8.0

3 years ago

1.7.0-rc.2

3 years ago

1.7.0

3 years ago

1.6.3

3 years ago

1.7.0-rc.1

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago