Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gathering AWS Lambda Execution Data

I'm currently working on a dissertation project that involves comparing performance times between different serverless providers. In order to do this, I need to collect data on execution times.

Is there a way to easily gather execution times for Lambda functions and export them in bulk (to a spreadsheet, for example)? I've looked at CloudWatch Metrics, Logs and X-Ray traces and I can't find any option to export the performance data. The alternative is sifting through each execution in X-Ray or Logs and writing the execution time down manually into a spreadsheet, which would be crazy for hundreds of executions. Azure, for example, lets you export the execution data to a spreadsheet.

Any help is really appreciated.

like image 226
Mark Nicoll Avatar asked Nov 22 '25 13:11

Mark Nicoll


1 Answers

You can export your CloudWatch logs to S3. In short:

  1. Create an S3 bucket
  2. Allow the CloudWatch logs principal (e.g. logs.us-west-2.amazonaws.com) to access it.
  3. Create a CloudWatch Logs export task from the Log Group to the S3 bucket.

Exporting CloudWatch metrics to S3 ist currently not supported. You could create your own tool that dumps this data to S3, e.g. by using get-metric-statistics or use an existing tool, like this one.

like image 141
M. Glatki Avatar answered Nov 24 '25 04:11

M. Glatki