I wrote an AWS lambda function in NodeJs that pulls id's off a database and queues them onto a AWS SQS queue. I had it working fine until I deployed a function to receive the messages and now the original function is not working. Here is the relevant code:
async function sendHelper(rows) { let i; let params; let res; let sqs = new AWS.SQS({apiVersion: '2012-11-05'}); for (i = 0; i < rows.length; i++) { params = { MessageBody: rows[i].ID.toString(), QueueUrl: 'https://sqs.' + process.env.AWS_REGION_NAME + '.amazonaws.com/' + process.env.AWS_ID_SHORT + '/' + process.env.SQS_VENDPERSON_QUEUE_NAME }; res = await sqs.sendMessage(params).promise().catch(err => errorHandler(err)); console.log(res); } return null; } The issue is that it isn't throwing an error anywhere. It just times out on the first sendMessage no matter how long you give it. I have since removed the message receiving function and the issues persists. Some additional info that might help is I have been using serverless to deploy.