AWS Lambda Layer for pyTenable
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
-
Log in to the AWS Lambda service page.
-
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.
-
On the function configuration page, locate the Layer section.
-
Click the Add a layer button.
-
On the Add layer page in the Choose a layer section, select the Specify an ARN option.
-
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.
-
Click the Add button.
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.
Reference
Lambda Layer ARNs for pyTenable
Lambda layer ARNs for pyTenable are listed in the table below:
Lambda Layer ARN | AWS Region | pyTenable Version |
---|---|---|
arn:aws:lambda:ap-northeast-1:476496926272:layer:pyTenable:1 | ap-northeast-1 | 1.4.3 |
arn:aws:lambda:ap-northeast-2:476496926272:layer:pyTenable:1 | ap-northeast-2 | 1.4.3 |
arn:aws:lambda:ap-northeast-3:476496926272:layer:pyTenable:1 | ap-northeast-3 | 1.4.3 |
arn:aws:lambda:ap-south-1:476496926272:layer:pyTenable:1 | ap-south-1 | 1.4.3 |
arn:aws:lambda:ap-southeast-1:476496926272:layer:pyTenable:1 | ap-southeast-1 | 1.4.3 |
arn:aws:lambda:ap-southeast-2:476496926272:layer:pyTenable:1 | ap-southeast-2 | 1.4.3 |
arn:aws:lambda:ca-central-1:476496926272:layer:pyTenable:1 | ca-central-1 | 1.4.3 |
arn:aws:lambda:eu-central-1:476496926272:layer:pyTenable:1 | eu-central-1 | 1.4.3 |
arn:aws:lambda:eu-north-1:476496926272:layer:pyTenable:1 | eu-north-1 | 1.4.3 |
arn:aws:lambda:eu-west-1:476496926272:layer:pyTenable:1 | eu-west-1 | 1.4.3 |
arn:aws:lambda:eu-west-2:476496926272:layer:pyTenable:1 | eu-west-2 | 1.4.3 |
arn:aws:lambda:eu-west-3:476496926272:layer:pyTenable:1 | eu-west-3 | 1.4.3 |
arn:aws:lambda:sa-east-1:476496926272:layer:pyTenable:1 | sa-east-1 | 1.4.3 |
arn:aws:lambda:us-east-1:476496926272:layer:pyTenable:1 | us-east-1 | 1.4.3 |
arn:aws:lambda:us-east-2:476496926272:layer:pyTenable:1 | us-east-2 | 1.4.3 |
arn:aws:lambda:us-west-1:476496926272:layer:pyTenable:1 | us-west-1 | 1.4.3 |
arn:aws:lambda:us-west-2:476496926272:layer:pyTenable:1 | us-west-2 | 1.4.3 |
For More Information
Updated 3 days ago