An SQS queue creator and SNS subscriber
sqns :: { k: v } -> Promise String
Call sqns
to create an SQS queue (and deadletter queue). You will be returned the queue URL of the newly created SQS queue. Optionally subscribe the queue to an SNS topic via the options below.
sqns
accepts a JSON object with the following options:
Option | Type | Default | Description |
---|---|---|---|
region |
String |
AWS region | |
queueName |
String |
an identifier for the queue | |
maxReceiveCount |
Number |
3 | maxReceiveCount for the queue redrive policy |
topic |
object |
{ rawMessageDelivery: true } |
SNS Topic Subscription options (see below) |
Option | Type | Default | Description |
---|---|---|---|
arn |
string |
SNS Topic ARN | |
filterPolicy |
Object |
SNS Topic Subscription Filter Policy | |
filterPolicyScope |
string |
SNS Topic Subscription Filter Policy Scope | |
rawMessageDelivery |
Boolean |
true |
SNS Topic Subscription Raw Message Delivery |
const sqns = require('sqns')
const queueUrl = sqns({
region: 'us-east-1',
queueName: `{username}-events`,
maxReceiveCount: 1,
topic: {
arn: topicArn,
}
})
Changes are tracked & published using changesets.
- Create a git branch. Make your desired changes.
- Run
yarn changeset
. Follow the prompts & specify if your change is a major, minor, or patch change. - Add all the changes to
.changesets
& commit. - Create a Pull Request. Merge into the master branch when ready.
Changesets will create a "Release" pull request whenever unpublished changesets are merged into master. When ready to publish to NPM, merge this pull request, and changes will be automatically published.