Setup Logs Collection

Using Lambda Layers, you can configure your Lambda functions to start sending logs to Lumigo.

Quickstart guide

To enable logging for your lambda manually:

  1. Add the logging layer according to your architecture.

πŸ“˜

Make sure to update the <REGION> according to your lambda

  • ARM: arn:aws:lambda:<REGION>:114300393969:layer:lumigo-log-collector-arm64:15
  • x86: arn:aws:lambda:<REGION>:114300393969:layer:lumigo-log-collector-amd64:15
  1. Add the following environment variable, make sure to replace the token with your Lumigo token, available at the settings page.

To enable logging for your lambda automatically (AWS Tag):

You can automatically enable Lumigo logging by adding the following AWS tag to your Lambda functions:

LUMIGO_LOG_COLLECTION: true

Lumigo periodically scans Lambda functions in your environment for the LUMIGO_LOG_COLLECTION AWS tag. When Lumigo identifies a Lambda function with the LUMIGO_LOG_COLLECTION AWS tag, it automatically adds the Lumigo logging layer and Lumigo endpoint.

πŸ“˜

Important Note (!)

It could take several minutes for Lumigo to identify the tag and instrument your function, which is why this installation method is NOT recommended to be used in Production.

Requirements for Lumigo Log Management

In order to use Lumigo's Logging Layer:

  1. The Lambda's unzipped total deployment package size must not exceed 250MB. This is an AWS limit for all Lambda deployments. The Lumigo log layer adds around 12MB.
  2. Custom Runtimes for Lambda do not support layers.
  3. For Lambdas that use Aliases, the layer can be added by adding the layer directly during deployment.

Modes of sending logs to Lumigo

There are two modes of sending logs to Lumigo:

  • On next invocation - invocation logs are buffered in the Lambda container and sent on the next function invocation in parallel to its execution. This parallelization results in virtually no latency addition to the function execution time. This is the default mode and the recommended mode for production.
    In the event that there isn't a subsequent invocation, it may take up to 5 minutes for logs to be sent to Lumigo.
  • On invocation end - Logs are sent to Lumigo at the end of each invocation. This mode is recommended in cases where many minutes can pass between function invocations, and added invocation duration is not significant (e.g. developers debugging in their dev environment)

To change the log sending mode for a Lambda function, add the following environment variable:
LUMIGO_SEND_ON_INVOCATION_END:true