I have lambda function which read sqs messages and process it. I have implement a trigger(lambda trigger) for the integration .
Each time when I push a message to the queue Lambda is getting invoked and from the logs I understood that all the messages are in in-flight status .
String queueUrl = sqs.getQueueUrl("test_queue").getQueueUrl();
final ReceiveMessageRequest receiveMessageRequest = new
ReceiveMessageRequest(queueUrl);
int count = getMessagesCount(sqs);
while(messagesCount > 0) {
List<Message> messages =
sqs.receiveMessage(receiveMessageRequest).getMessages();
logger.info("No.of messages in queue :{} ", count);
Lambda time out and sqs visibility timeout are 20 minutes. SQS configuration is given below