Mark Nicoll
Mark Nicoll

Reputation: 33

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.

Upvotes: 3

Views: 222

Answers (1)

M. Glatki
M. Glatki

Reputation: 787

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.

Upvotes: 2

Related Questions