By AM Grobelny, Tenable Principal Solutions Architect
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 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.
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.
Lambda layer ARNs for pyTenable are listed in the table below:
|Lambda Layer ARN||AWS Region||pyTenable Version|
Updated 9 months ago