aws-sns-configure
v0.0.3
Published
High level interface to configure SQS subscriptions (with permissions) to SNS
Downloads
1,879
Readme
aws-sns-configure
:email: High level interface to configure SQS subscriptions (with permissions) to SNS
Installation
npm install aws-sns-configure --save-dev
Usage
const snsConfigure = require('./index')
snsConfigure.init({
accessKeyId: 'XXXXXXXXXXXXXXXXXXX',
secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
region: 'sa-east-1'
})
const topic = await snsConfigure.createOrGetSNSTopicByName('topic-name')
await snsConfigure.configureSQSSubscriptionWithPermissions({
topicArn: topic.TopicArn,
sqsArn: 'arn:aws:sqs:sa-east-1:XXXXXXXXXXXX:queue-name'
})