AWS Security ChangesHomeSearch

AWS lambda documentation change

Service: lambda · 2025-04-25 · Documentation low

File: lambda/latest/dg/adding-layers.md

Summary

Updated layer management documentation: removed compatibility note, restructured 'Add layer' instructions, updated CLI examples to python3.13, removed section about accessing layer content from /opt directory, and added cross-account layer references.

Security assessment

The changes primarily involve documentation restructuring and runtime version updates. While the removed compatibility note could indirectly impact security if ignored, there's no explicit evidence of addressing a specific vulnerability. The cross-account layer reference includes a permissions link but doesn't introduce new security documentation.

Diff

diff --git a/lambda/latest/dg/adding-layers.md b/lambda/latest/dg/adding-layers.md
index 6731eca16..f9258ad61 100644
--- a//lambda/latest/dg/adding-layers.md
+++ b//lambda/latest/dg/adding-layers.md
@@ -5 +5 @@
-Accessing layer content from your functionFinding layer information
+Finding layer information
@@ -28,5 +28 @@ Your functions can continue to use any layer version that you’ve already added
-###### Note
-
-Make sure that the layers you add to a function are compatible with the runtime and instruction set architecture of the function.
-
-###### To add a layer to a function (console)
+###### To add a layer to a function
@@ -36 +32 @@ Make sure that the layers you add to a function are compatible with the runtime
-  2. Choose the function to configure.
+  2. Choose the function.
@@ -38 +34 @@ Make sure that the layers you add to a function are compatible with the runtime
-  3. Under **Layers** , choose **Add a layer**
+  3. Scroll down to the **Layers** section, and then choose **Add a layer**.
@@ -42 +38,3 @@ Make sure that the layers you add to a function are compatible with the runtime
-    1. For the **AWS layers** or **Custom layers** layer sources, choose a layer from the pull-down menu. Under **Version** , choose a layer version from the pull-down menu.
+    1. **AWS layers** : Choose from the list of [AWS-managed extensions](./extensions-api-partners.html#aws-managed-extensions).
+
+    2. **Custom layers** : Choose a layer created in your AWS account.
@@ -44 +42,3 @@ Make sure that the layers you add to a function are compatible with the runtime
-    2. For the **Specify an ARN** layer source, enter an ARN in the text box and choose **Verify**. Then, choose **Add**.
+    3. **Specify an ARN** : To use a layer [from a different AWS account](./permissions-layer-cross-account.html), such as a [third-party extension](./extensions-api-partners.html), enter the Amazon Resource Name (ARN).
+
+  5. Choose **Add**.
@@ -89,19 +88,0 @@ You cannot update function layer versions across AWS accounts.
-###### Topics
-
-  * Accessing layer content from your function
-
-  * Finding layer information
-
-
-
-
-## Accessing layer content from your function
-
-If your Lambda function includes layers, Lambda extracts the layer contents into the `/opt` directory in the function execution environment. Lambda extracts the layers in the order (low to high) listed by the function. Lambda merges folders with the same name. If the same file appears in multiple layers, the function uses the version in the last extracted layer.
-
-Each Lambda runtime adds specific `/opt` directory folders to the `PATH` variable. Your function code can access the layer content without having to specify the path. For more information about path settings in the Lambda execution environment, see [Defined runtime environment variables](./configuration-envvars.html#configuration-envvars-runtime).
-
-Refer to [Layer paths for each Lambda runtime](./packaging-layers.html#packaging-layers-paths) to learn where to include your libraries when creating a layer.
-
-If you’re using a Node.js or Python runtime, you can use the built-in code editor in the Lambda console. You should be able to import any library that you’ve added as a layer to the current function.
-
@@ -110 +91 @@ If you’re using a Node.js or Python runtime, you can use the built-in code edi
-To find layers in your account that are compatible with your function’s runtime, use the [ListLayers](https://docs.aws.amazon.com/lambda/latest/api/API_ListLayers.html) API. For example, you can use the following `list-layers` AWS Command Line Interface (CLI) command:
+To find layers in your account that are compatible with your function’s runtime, use the [ListLayers](https://docs.aws.amazon.com/lambda/latest/api/API_ListLayers.html) API. For example, you can use the following [list-layers](https://docs.aws.amazon.com/https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/list-layers.html) AWS Command Line Interface (CLI) command:
@@ -113 +94 @@ To find layers in your account that are compatible with your function’s runtim
-    aws lambda list-layers --compatible-runtime python3.9
+    aws lambda list-layers --compatible-runtime python3.13
@@ -127 +108 @@ You should see output similar to the following:
-                    "CreatedDate": "2023-11-15T00:37:46.592+0000",
+                    "CreatedDate": "2025-04-15T00:37:46.592+0000",
@@ -129,3 +110 @@ You should see output similar to the following:
-                        "python3.9",
-                        "python3.10",
-                        "python3.11",
+                        "python3.13"