0

So I have created a FIFO queue where 10000 messages gets pushed which belong to 100 message groups and consumed by lambda.

So wanted to see the following questions metrics:

  1. What is the total time taken to process all messages in each message group in FIFO queue?
  2. What is the total time taken to process all messages in FIFO queue?

Lambda Invocations and Concurrent executions metrics are available.

user17090811
  • 143
  • 2
  • 10

1 Answers1

1

SQS is just a data store for messages. How much time it takes for the message to process or execute is not SQS concern. You can't get what you're looking for from SQS default metrics. You have to write custom logic in your message processor service (lambda here) to log the values into CloudWatch and create a metric from there.

Default AWS SQS available metrics can be found here https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html

Hussain Mansoor
  • 2,934
  • 2
  • 27
  • 40
  • Correct. But coming just to the question Q. How to calculate the total time taken to process all messages in each message group in FIFO queue? is not possible right as each lambda invocation can have messages from different message groups. Considering my case 100 message groups with each having 100 messages with batch size 1 – user17090811 Jan 13 '22 at 07:59
  • You have to architect the system like that. Each Queue is processed by a specific Lambda function. Lambda function have to calculate message processing time and log it somewhere for each message. Then have to glue up all the data points to get total execute time per queue, etc. – Hussain Mansoor Jan 13 '22 at 08:55