Help Amazon Web Services Lambda Execution Logs

Integration with Lambda Execution Logs

Achieve real-time observability into your Lambda environments with the Lambda Extensions integration with Site24x7. The extensions run as a companion processes outside the Lambda function runtime process so you can configure the execution environment.

Site24x7’s integration with Lambda Extensions helps you plug into the execution cycle before, during, and after an invocation. The logs are obtained from Lambda functions rather than CloudWatch logs and are pushed into Site24x7 AppLogs to diagnose them further.

When the JSON access policy has the permission lambda:UpdateFunctionConfiguration added, the integration is done automatically.

Site24x7 is AWS-reviewed Lambda Service Ready Program Partner

AWS-reviewed Lambda Service Ready Program partner

Contents

Prerequisites

For the AWS console, you need:

  • An AWS account ID.
  • A Lambda function monitored by Site24x7.

For the Site24x7 console, you need to:

  • Have a valid and active AWS account.
  • Integrate your AWS account with Site24x7. Learn more.
  • Grant the permission lambda:UpdateFunctionConfiguration that enables us to integrate your account with Lambda Extensions automatically.
  • If not, you can set up the integration manually by following the steps below:

Integrate with Lambda Extensions using Extension ARN

To manually integrate Site24x7 with Lambda Extensions using Extension ARN, you need to:

  1. Log in to your Site24x7 account.
  2. Navigate to Cloud > AWS > All Accounts Summary > Lambda monitor.
  3. Select the name of the monitor (a Lambda function) that you'd like to integrate with a Lambda Extension.
  4. Navigate to the Lambda Execution Logs tab, where you’ll see the text fields Log Config Key and Lambda Extension ARN with values.
  5. Log in to the AWS management console and enter “AWS Lambda” into the search bar at the top of the page.
  6. Navigate to Functions and search for the Lambda function that is monitored by Site24x7.

    AWS Lambda functions to configure.

  7. After selecting that function, select Layers and then Add a layer.
  8. Under Choose a layer, select Specify an ARN. Paste the Lambda extension ARN provided in the Site24x7 console into the Specify an ARN text field. Click Add.

    AWS Lambda functions to add layers.

  9. On getting the success message, navigate to the Configuration tab of your monitored function, and select Environment variables from the left navigation bar.
  10. Select Add environment variable.
  11. By default, the Key to be entered is logTypeConfig, and the Value is the encoded string provided in the Log Config Key field in the Site24x7 console. Click Save. You'll receive a success message.

    Add environment variables for AWS Lambda functions.

  12. Reload the Lambda Execution Logs tab in the Site24x7 console to view the successful integration

Integrate Site24x7 with Lambda Extensions using .ZIP archives

SITE24X7_LAMBDA_LOG_EXTENSION and logTypeConfig must always be added as keys when you're integrating using a .ZIP file. To deploy a function using a container image, download the .ZIP file and include the extension file inside your /opt/extensions folder in the container image. Read more.

To integrate Site24x7 with Lambda Extensions using .ZIP archives, you need to:

  1. Log in to your Site24x7 account.
  2. Navigate to Cloud > AWS > All Accounts Summary > Lambda monitor.
  3. Select the name of the monitor (a Lambda function) that you'd like to integrate with a Lambda Extension.
  4. Navigate to the Lambda Execution Logs tab, where you’ll see the Integrate using a ZIP file tab with text fields Log Config Key and S3 URL along with a drop-down to select the region.
  5. Copy and paste the S3 URL shared (based on chosen Region) in your browser, and download the ZIP file. The downloaded ZIP file contains the extension.
  6. Log in to the AWS management console and enter AWS Lambda in the search bar at the top of the page.
  7. Navigate to Layers and click Create layer
  8. Fill in the Name field, and upload the ZIP file that you downloaded in step 5. You can also paste the S3 URL provided in the Site24x7 console. Click Create.You'll receive a success message.

    Create AWS Lambda layers to integrate lambda extensions.

  9. Once the layer is created, you can add a Lambda extension by including the layer in the Function monitored in Site24x7. Copy the Version ARN that you obtained after layer creation, and paste it in the Specify an ARN text field in the Add layer screen of your monitored Lambda function. Click Add.
  10. Under the Configuration tab of your monitored function, select Environment variables from the left navigation bar. Click Edit.
  11. In the Edit environment variables page, click Add environment variable, and enter the Key and Value. The key must be SITE24X7_LAMBDA_LOG_EXTENSION and the value can be any value. Click Save.

    Create environment variables to integrate AWS Lambda extensions.

  12. Reload the Lambda Execution Logs tab in the Site24x7 console to view the successful integration.

Upgrade the version of Lambda Extension

(i) ARN Method

To upgrade the version of the Lambda Extensions integrated using an ARN method, you need to:

  1. Follow the steps 1 to 3 in integrating Site24x7 with Lambda Extensions using ARN method.
  2. Navigate to the Lambda Execution Logs tab, where you'll see a yellow box at the top. On clicking Upgrade Lambda Log Extension, a pop-up will appear. Select Upgrade using Extension ARN, where two text fields, Log Config Key and Lambda Extension ARN will be available.
  3. Using the new values of Log Config Key and Lambda Extension ARN, follow the steps 5 to 11 to create a layer, and add environment variables.
  4. Reload the Lambda Execution Logs tab in Site24x7 console to view the successful integration.

(ii) .ZIP archive

To upgrade the version of the Lambda Extensions integrated using the .ZIP archive method, you need to:

  1. Follow the steps 1 to 3 in integrating Site24x7 with Lambda Extensions using .ZIP archives.
  2. Navigate to the Lambda Execution Logs tab, where you'll see a yellow box at the top. On clicking Upgrade Lambda Log Extension, a pop-up will appear. Select Upgrade using a ZIP file, where a text field, S3 URL will be available.
  3. Using this new S3 URL, follow the steps 5 to 11 to create a layer, and add environment variables.
  4. Reload the Lambda Execution Logs tab in the Site24x7 console to view the successful integration.

Performance Impacts

Lambda Extensions can impact the performance of your Lambda function since they share the same resources as your code. These shared resources include the CPU, memory, network bandwidth, and storage. To monitor the performance overhead of the lambda extensions, we consider the metric PostRuntimeExtensionsDuration which estimates the extra time (after your code has finished running) while using an extension.

Additional charges will be incurred for your Lambda function from AWS due to the rise in function execution duration and memory usage of Lambda Extensions.

Example:

To understand the performance impacts of Lambda Extensions on the function's code size, execution time, and latency, consider these two scenarios:

Case 1: Function execution results without Lambda Extensions.

Lambda function performance without Lambda Extensions.

Case 2: Function execution results with Lambda Extensions.

Lambda function performance with Lambda Extensions.

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.

Help Amazon Web Services Lambda Execution Logs