AWS Lambda

Send AWS Lambda logs to Timber

Timber integrates with AWS Lambda through the AWS CloudWatch Logs subscriptions feature, making it simple to forward your Lambda log to Timber while still capturing useful context and platform events.

Installation

By default, your AWS Lambda function will create a dedicated CloudWatch Logs stream. You can simply forward this stream to Timber by following the AWS CloudWatch Logs instructions. Be sure to select your AWS Lambda function's stream during the process:

Events

AWS Lambda logs platform events that contain useful information about the execution of your Lambda function. Timber automatically parses these events making them easier to search and graph.

Request Start

The request start event is emitted immediately before a Lambda invocation.

Before
After
START RequestId: 84f70cff-ab16-4f17-a729-91cc92530be4 Version: $LATEST
{
"type": "END",
"request_id": "84f70cff-ab16-4f17-a729-91cc92530be4"
}

Request End

The request end event is emitted immediately when you lambda invocation ends.

Before
After
END RequestId: 84f70cff-ab16-4f17-a729-91cc92530be4
{
"type": "START",
"request_id": "84f70cff-ab16-4f17-a729-91cc92530be4",
"version": "$LATEST"
}

Report

The report event is emitted immediately after a Lambda invocation, it contains useful summary information.

Before
After
REPORT RequestId: 84f70cff-ab16-4f17-a729-91cc92530be4 Duration: 10028.34 ms Billed Duration: 10100 ms Memory Size: 1280 MB Max Memory Used: 173 MB
{
"type": "REPORT",
"request_id": "84f70cff-ab16-4f17-a729-91cc92530be4",
"duration_ms": 10028.34,
"billed_duration_ms": 10100,
"memory_size_mb": 1280,
"max_memory_used_mb": 173
}

Troubleshooting

Because the AWS Lambda integration relies on CloudWatch Logs we recommend viewing the CloudWatch logs troubleshooting guide: