AWS lambda documentation change
Summary
Updated Python runtime version references from 3.13 to 3.11 in layer creation instructions and compatibility notes
Security assessment
The changes involve updating Python version numbers and directory paths to reflect compatibility with Python 3.11 instead of 3.13. There is no mention of security vulnerabilities or security-related context in the diff.
Diff
diff --git a/lambda/latest/dg/python-layers.md b/lambda/latest/dg/python-layers.md index b94e52b1f..b05418a0e 100644 --- a/lambda/latest/dg/python-layers.md +++ b/lambda/latest/dg/python-layers.md @@ -45 +45 @@ To follow the steps in this section, you must have the following: - * [Python 3.13](https://www.python.org/downloads/release/python-3130/) and the [pip](https://pip.pypa.io/en/stable/installation/) package installer + * [Python 3.11](https://www.python.org/downloads/release/python-3118/) and the [pip](https://pip.pypa.io/en/stable/installation/) package installer @@ -52 +52 @@ To follow the steps in this section, you must have the following: -Throughout this topic, we reference the [`layer-python`](https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/sample-apps/layer-python) sample application on the **awsdocs** GitHub repository. This application contains scripts that download the dependencies and generate the layers. The application also contains corresponding functions that use dependencies from the layers. After creating a layer, you can deploy and invoke the corresponding function to verify that everything works properly. The runtime of the layer must be compatible with the runtime of the function. For example, if you use the Python 3.13 runtime for your function, your layer must also be compatible with Python 3.13. +Throughout this topic, we reference the [`layer-python`](https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/sample-apps/layer-python) sample application on the **awsdocs** GitHub repository. This application contains scripts that download the dependencies and generate the layers. The application also contains corresponding functions that use dependencies from the layers. After creating a layer, you can deploy and invoke the corresponding function to verify that everything works properly. Because you use the Python 3.11 runtime for the functions, the layers must also be compatible with Python 3.11. @@ -94 +94 @@ For example, the resulting layer .zip file that you create in this tutorial has - └ python3.13 + └ python3.11 @@ -100 +100 @@ For example, the resulting layer .zip file that you create in this tutorial has -The [`requests`](https://pypi.org/project/requests/) library is correctly located in the `python/lib/python3.13/site-packages` directory. This ensures that Lambda can locate the library during function invocations. +The [`requests`](https://pypi.org/project/requests/) library is correctly located in the `python/lib/python3.11/site-packages` directory. This ensures that Lambda can locate the library during function invocations. @@ -134 +134 @@ This script uses `venv` to create a Python virtual environment named `create_lay - python3.13 -m venv create_layer + python3.11 -m venv create_layer @@ -155 +155 @@ This script copies the contents from the `create_layer/lib` directory into a new -In this section, you take the `layer_content.zip` file that you generated in the previous section and upload it as a Lambda layer. You can upload a layer using the AWS Management Console or the Lambda API via the AWS Command Line Interface (AWS CLI). When you upload your layer .zip file, in the following [PublishLayerVersion](https://docs.aws.amazon.com/lambda/latest/api/API_PublishLayerVersion.html) AWS CLI command, specify `python3.13` as the compatible runtime and `arm64` as the compatible architecture. +In this section, you take the `layer_content.zip` file that you generated in the previous section and upload it as a Lambda layer. You can upload a layer using the AWS Management Console or the Lambda API via the AWS Command Line Interface (AWS CLI). When you upload your layer .zip file, in the following [PublishLayerVersion](https://docs.aws.amazon.com/lambda/latest/api/API_PublishLayerVersion.html) AWS CLI command, specify `python3.11` as the compatible runtime and `arm64` as the compatible architecture. @@ -160 +160 @@ In this section, you take the `layer_content.zip` file that you generated in the - --compatible-runtimes python3.13 \ + --compatible-runtimes python3.11 \ @@ -214 +214 @@ The Lambda [function code](https://github.com/awsdocs/aws-lambda-developer-guide - --runtime python3.13 \ + --runtime python3.11 \