How can we check when each Lambda function in AWS was last used
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?
- Topics
- ServerlessCompute
- Tags
- AWS Lambda
- Language
- English
asked 3 years ago3.5K views
- Newest
- Most votes
- Most comments
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.
- rePost-User-38350093 years ago
Hi Riku, Thank You for sharing the details.
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
Relevant content
asked 3 years ago
- Accepted Answer
asked 4 years ago
