JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 108
  • Score
    100M100P100Q80364F
  • License MIT

Push messages to an AWS (FIFO) SQS queue

Package Exports

  • aws-sqs-push

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aws-sqs-push) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

aws-sqs-push Build Status

Push messages to an AWS SQS (FIFO) queue

Small wrapper around the getQueueUrl and sendMessage from the AWS SQS SDK. This will automatically retrieve the queue url when sending a message. This is useful when you only have the queue name.

Requirements

  • Node >= 8.

Install

$ npm install --save aws-sqs-push

Usage

const sqsPush = require('aws-sqs-push');

const request = {
    MessageBody: JSON.stringify({message: 'foo'});
    DelaySeconds: 10
}

sqsPush('QueueName', request, '123456789101').then(sendMessageResponse => {
    // ...
});

const fifoRequest = {
    messageDeduplicationId: '12312333331323'
    messageGroupId: '8875gyukjdsioop90123',
    MessageBody: JSON.stringify({message: 'FIFO'});
}

sqsPush('QueueName.fifo', fifoRequest).then(sendMessageResponse => {
    // ...
});

API

sqsPush(queueName, request, [awsAccountId])

Result is the response of the AWS SQS sendMessage API

queueName

Required: true Type: string

Name of the queue you want to push a message to. This can be a cross account queue but permissions must be granted to able to push on that queue.

request

Required: true Type: object

Request properties are defined in the documentation of the sendMessage method of the AWS SDK

awsAccountId

Required: false Type: string

AWS account id of the owner of the queue. This optional parameter allows to push on cross account queue.

License

MIT © Simon Jang