AWS Lambda Layer for pyTenable

avatar guy
By AM Grobelny, Tenable Principal Solutions Architect

Introduction

Amazon Web Services (AWS) Lambda layers provide a method to reference additional libraries and dependencies within your Lambda functions without the need to include those libraries and dependencies within the Lambda function archive package used to create your functions. Using Lambda layers reduces the size of uploaded deployment archives and makes it easier and faster to deploy your code. For more information about AWS Lambda layers, see Using Layers in Your Lambda Function in the AWS Lambda Developer Guide.

This article explains how you can include Tenable's managed AWS Lambda layer for pyTenable in your Lambda functions.

Before You Begin

Before including Tenable's managed AWS Lambda layer for pyTenable in your functions, you must first find the appropriate Lambda layer Amazon Resource Name (ARN). AWS Lambda layers exist per AWS region, so you must use the appropriate ARN based on the AWS region in which your function is deployed.

Refer to Lambda Layer ARNs for pyTenable in the Reference section.

Add the AWS Lambda Layer for pyTenable to Your Function

  1. Log in to the AWS Lambda service page.

  2. On the AWS Lambda service page, select an existing function or create a new function.

    Note: Your Lambda function must use Python runtime 3.9, 3.8, 3.7, or 3.6. For more information about Lambda runtimes, see Lambda runtimes in the AWS Lambda Developer Guide.

  3. On the function configuration page, locate the Layer section.

    Lambda Layers

  4. Click the Add a layer button.

  5. On the Add layer page in the Choose a layer section, select the Specify an ARN option.

  6. Copy and paste the pyTenable AWS Lambda layer ARN you previously selected and click the Verify button.

    Note: Make sure you are using the specific ARN for the AWS region in which your function is located.

  7. Click the Add button.

    Add Layer

After adding the layer, pyTenable will automatically appear in the Python packages within your function's runtime environment. To use pyTenable, simply import the library as you normally would into your python AWS Lambda function.

Code Source

Reference

Lambda Layer ARNs for pyTenable

Lambda layer ARNs for pyTenable are listed in the table below:

Lambda Layer ARNAWS RegionpyTenable Version
arn:aws:lambda:ap-northeast-1:476496926272:layer:pyTenable:1ap-northeast-11.4.3
arn:aws:lambda:ap-northeast-2:476496926272:layer:pyTenable:1ap-northeast-21.4.3
arn:aws:lambda:ap-northeast-3:476496926272:layer:pyTenable:1ap-northeast-31.4.3
arn:aws:lambda:ap-south-1:476496926272:layer:pyTenable:1ap-south-11.4.3
arn:aws:lambda:ap-southeast-1:476496926272:layer:pyTenable:1ap-southeast-11.4.3
arn:aws:lambda:ap-southeast-2:476496926272:layer:pyTenable:1ap-southeast-21.4.3
arn:aws:lambda:ca-central-1:476496926272:layer:pyTenable:1ca-central-11.4.3
arn:aws:lambda:eu-central-1:476496926272:layer:pyTenable:1eu-central-11.4.3
arn:aws:lambda:eu-north-1:476496926272:layer:pyTenable:1eu-north-11.4.3
arn:aws:lambda:eu-west-1:476496926272:layer:pyTenable:1eu-west-11.4.3
arn:aws:lambda:eu-west-2:476496926272:layer:pyTenable:1eu-west-21.4.3
arn:aws:lambda:eu-west-3:476496926272:layer:pyTenable:1eu-west-31.4.3
arn:aws:lambda:sa-east-1:476496926272:layer:pyTenable:1sa-east-11.4.3
arn:aws:lambda:us-east-1:476496926272:layer:pyTenable:1us-east-11.4.3
arn:aws:lambda:us-east-2:476496926272:layer:pyTenable:1us-east-21.4.3
arn:aws:lambda:us-west-1:476496926272:layer:pyTenable:1us-west-11.4.3
arn:aws:lambda:us-west-2:476496926272:layer:pyTenable:1us-west-21.4.3

For More Information