Skip to content

Instantly share code, notes, and snippets.

@oxlb
Created March 25, 2021 15:33
Show Gist options
  • Save oxlb/89f437afa34901e9b0c05ea1b345828f to your computer and use it in GitHub Desktop.
Save oxlb/89f437afa34901e9b0c05ea1b345828f to your computer and use it in GitHub Desktop.
// Load the AWS SDK for Node.js
const AWS = require('aws-sdk');
// Set the region
AWS.config.update({region: 'ap-southeast-1'});
const config = {
endpoint: new AWS.Endpoint('http://localhost:4566'),
accessKeyId: 'na',
secretAccessKey: 'na',
region: 'ap-southeast-1'
}
const QUEUE_NAME = 'onexlab';
// Create an SQS service object
const SQS = new AWS.SQS(config);
const listParams = {};
const createParams = {
QueueName: QUEUE_NAME,
Attributes: {
'DelaySeconds': '60',
'MessageRetentionPeriod': '86400'
}
};
module.exports = {
SQS,
QUEUE_NAME,
listParams,
createParams,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment