Classes to make it easier to work with the AWS SDK
const saws = new SAWS();
// SQS
const sqs = saws.sqs(null, null, null, process.env.AWS_QUEUE_URL);
const queues = await sqs.listQueues()
.then((resp: IResponse) => resp)
.catch((err: IResponse) => err);
const queues = await sqs.getQueueUrlByName(process.env.AWS_QUEUE_NAME)
.then((resp: IResponse) => resp)
.catch((err: IResponse) => err);
const sendMessage = await sqs.sendMessage(message, groupId, deduplicationId)
.then((resp: IResponse) => resp)
.catch((err: IResponse) => err);
const receiveMessage = await sqs.receiveMessages(1, 60, 0)
.then((resp: IResponse) => resp)
.catch((err: IResponse) => err);
const deleteMessage = await sqs.deleteMessage(message.ReceiptHandle)
.then((resp: IResponse) => resp)
.catch((err: IResponse) => err);