Created
March 25, 2021 15:33
-
-
Save oxlb/89f437afa34901e9b0c05ea1b345828f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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