How can we check when each Lambda function in AWS was last used

0

We have around 200+ Lambda functions. How can we check when each Lambda function in AWS was last used? While going through the Lambda function details, I found only the last modified entry. Similarly, is it possible to determine the time it was last executed without checking the CloudWatch and the Monitoring tab?

Pascal
asked 5 months ago567 views
2 Answers
1

Hello.

A surefire way is to open CloudWatch Logs from Monitoring and check the latest execution times.
As far as I know, you can probably only do this on the management console by checking the monitoring or checking the logs.

profile picture
EXPERT
answered 5 months ago
  • Hi Riku, Thank You for sharing the details.

0

Hi,

I'd suggest you to go this post: https://stackoverflow.com/questions/73887032/get-last-execution-date-for-more-than-100-lambdas

It provides some Python code to obtain the last execution time that you're after.

I would suggest to replace the text files with the list of functions names by a call to https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda/client/list_functions.html

Best,

Didier

profile pictureAWS
EXPERT
answered 5 months ago
profile picture
EXPERT
reviewed 5 months ago
profile picture
EXPERT
reviewed 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions