I have one SQS that will trigger an AWS Lambda that will then send messages over to a second SQS queue via the AWS Toolkit in .Net leveraging the SendMessageBatchAsync method. Our cloud watch logs have a log before and after the SendMessageBatchAsync. We are testing two messages that should both make it to the second queue. Both messages come off the first queue, and will trigger the Lambda no problems. The issue is the Lambda will stop after the timeout window and the message never makes it to SQS. I can set the timeout to 2 minutes, or 5 minutes and it does the same thing. I just hangs on the SendMessageBatchAsync. Sometimes both messages will run fine 2, 3 or 6 times in a row. Then when I push two messages to the first queue only 1 message gets thru and the second one will hang, and end up in the DLQ after the Lambda timeout window. We've tried using a VPC endpoint too and same result. It isn't the same message happening every time either. It could be either one of the two messages that will get stuck in-flight and the Lambda will end after its timeout window. The messages are small only 250 bytes. The logs show when it does run perfectly the lambda processes and pushes to the second queue within seconds. What can cause such inconsistent behaviors like this? I can't add any more logs since it literally is logged before and after the SendMessageBatchAsync method and the next cloudwatch log x minutes later is Lambda stops.
Asked
Active
Viewed 37 times