Skip to content

Commit a04ef72

Browse files
More changes
1 parent 569db97 commit a04ef72

File tree

12 files changed

+25
-16
lines changed

12 files changed

+25
-16
lines changed

.github/workflows/quality_code_cdk_constructor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ permissions:
2828
contents: read
2929

3030
jobs:
31-
quality_check:
31+
quality_check_cdk:
3232
runs-on: ubuntu-latest
3333
strategy:
3434
max-parallel: 4
3535
matrix:
36-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
36+
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
3737
env:
3838
PYTHON: "${{ matrix.python-version }}"
3939
permissions:

.github/workflows/reusable_deploy_v3_sar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy V3 SAR
44
#
55
# 1. This workflow starts after the layer artifact is produced on `publish_v3_layer`
66
# 2. We use the same layer artifact to ensure the SAR app is consistent with the published Lambda Layer
7-
# 3. We publish the SAR for 3.8 to 3.12 Python runtime and both x86_64 and arm64 (see `matrix` section)
7+
# 3. We publish the SAR for 3.8 to 3.13 Python runtime and both x86_64 and arm64 (see `matrix` section)
88
# 4. We use `sam package` and `sam publish` to publish the SAR app
99
# 5. We remove the previous Canary stack (if present) and deploy a new one to test the SAR App. We retain the Canary in the account for debugging purposes
1010
# 6. Finally the published SAR app is made public on the PROD environment

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ In this context, `[aws-sdk]` is an alias to the `boto3` package. Due to dependen
267267

268268
### Lambda Layer
269269

270-
[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize [all dependencies](#install) for Python versions from **3.8 to 3.12**, as well as for both **arm64 and x86_64** architectures, to ensure compatibility. We also remove duplicate dependencies [already available in the Lambda runtime](https://github.com/aws-powertools/powertools-lambda-layer-cdk/blob/d24716744f7d1f37617b4998c992c4c067e19e64/layer/Python/Dockerfile#L36){target="_blank"} to achieve the most optimal size.
270+
[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize [all dependencies](#install) for Python versions from **3.8 to 3.13**, as well as for both **arm64 and x86_64** architectures, to ensure compatibility. We also remove duplicate dependencies [already available in the Lambda runtime](https://github.com/aws-powertools/powertools-lambda-layer-cdk/blob/d24716744f7d1f37617b4998c992c4c067e19e64/layer/Python/Dockerfile#L36){target="_blank"} to achieve the most optimal size.
271271

272272
=== "x86_64"
273273
--8<-- "docs/includes/_layer_homepage_x86.md"

docs/tutorial/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Let's clone our sample project before we add one feature at a time.
2020
Bootstrap directly via SAM CLI:
2121

2222
```shell
23-
sam init --app-template hello-world-powertools-python --name sam-app --package-type Zip --runtime python3.12 --no-tracing
23+
sam init --app-template hello-world-powertools-python --name sam-app --package-type Zip --runtime python3.13 --no-tracing
2424
```
2525

2626
```bash title="Use SAM CLI to initialize the sample project"
27-
sam init --runtime python3.12 --dependency-manager pip --app-template hello-world --name powertools-quickstart
27+
sam init --runtime python3.13 --dependency-manager pip --app-template hello-world --name powertools-quickstart
2828
```
2929

3030
### Project structure

docs/upgrade.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ We have stopped exporting Pydantic objects directly from `aws_lambda_powertools.
108108

109109
!!! note "No code changes required"
110110

111-
To give you better a better experience, we're now building Powertools for AWS Lambda (Python)'s Lambda layers for specific Python versions (`3.8-3.12`) and architectures (`x86_64` & `arm64`).
111+
To give you better a better experience, we're now building Powertools for AWS Lambda (Python)'s Lambda layers for specific Python versions (`3.8-3.13`) and architectures (`x86_64` & `arm64`).
112112

113113
This also allows us to include architecture-specific versions of both Pydantic v2 and AWS Encryption SDK and give you a more streamlined setup.
114114

@@ -121,11 +121,13 @@ To take advantage of the new layers, you need to update your functions or deploy
121121
| x86_64 | 3.10 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86_64:{version} |
122122
| x86_64 | 3.11 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86_64:{version} |
123123
| x86_64 | 3.12 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:{version} |
124+
| x86_64 | 3.13 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:{version} |
124125
| arm64 | 3.8 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:{version} |
125126
| arm64 | 3.9 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:{version} |
126127
| arm64 | 3.10 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-arm64:{version} |
127128
| arm64 | 3.11 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-arm64:{version} |
128129
| arm64 | 3.12 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:{version} |
130+
| arm64 | 3.13 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:{version} |
129131

130132
## Event Handler: headers are case-insensitive
131133

layer_v3/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ WORKDIR /tmp
1919
# PACKAGE_SUFFIX = ' @ git+https://github.com/awslabs/aws-lambda-powertools-python@v2'
2020
# PACKAGE_SUFFIX = ''
2121

22-
# PYTHON_VERSION = 3.8, 3.9, 3.10, 3.11, and 3.12
22+
# PYTHON_VERSION = 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13
2323

2424
# Installing libs based on base image; We must use dnf for AL2023 (Python 3.12+)
2525
COPY install_libraries.sh .

layer_v3/layer/canary_stack.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ def __init__(
141141
runtime = Runtime.PYTHON_3_11
142142
elif python_version == "python3.12":
143143
runtime = Runtime.PYTHON_3_12
144+
elif python_version == "python3.13":
145+
runtime = Runtime.PYTHON_3_13
144146
else:
145147
raise ValueError("Unsupported Python version")
146148

layer_v3/layer/layer_stack.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def __init__(
9494
python_version = Runtime.PYTHON_3_11
9595
if python_version == "python3.12":
9696
python_version = Runtime.PYTHON_3_12
97+
if python_version == "python3.13":
98+
python_version = Runtime.PYTHON_3_13
9799

98100
has_arm64_support = CfnParameter(
99101
self,

layer_v3/layer_constructors/layer_stack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class LambdaPowertoolsLayerPythonV3(lambda_.LayerVersion):
2222
Attributes:
2323
scope (Construct): The scope in which to define this construct.
2424
construct_id (str): The scoped construct ID. Must be unique amongst siblings in the same scope.
25-
python_version (lambda_.Runtime): The Python runtime version for the layer. Defaults to Python 3.12.
25+
python_version (lambda_.Runtime): The Python runtime version for the layer. Defaults to Python 3.13.
2626
include_extras (bool): Whether to include extra dependencies. Defaults to True.
2727
architecture (lambda_.Architecture): The compatible Lambda architecture. Defaults to x86_64.
2828
powertools_version (str): The version of Powertools to use. If empty, uses the latest version.
@@ -43,7 +43,7 @@ def __init__(
4343
self,
4444
scope: Construct,
4545
construct_id: str,
46-
python_version: lambda_.Runtime = lambda_.Runtime.PYTHON_3_12,
46+
python_version: lambda_.Runtime = lambda_.Runtime.PYTHON_3_13,
4747
include_extras: bool = True,
4848
architecture: lambda_.Architecture = lambda_.Architecture.X86_64,
4949
powertools_version: str = "",

layer_v3/layer_constructors/tests/unit/test_new_cdk_constructor_stack.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_with_no_configuration_constructor():
1717

1818
template.has_resource_properties("AWS::Lambda::LayerVersion", {"LicenseInfo": "MIT-0"})
1919

20-
template.has_resource_properties("AWS::Lambda::LayerVersion", {"CompatibleRuntimes": ["python3.12"]})
20+
template.has_resource_properties("AWS::Lambda::LayerVersion", {"CompatibleRuntimes": ["python3.13"]})
2121

2222

2323
@pytest.mark.parametrize(
@@ -28,6 +28,7 @@ def test_with_no_configuration_constructor():
2828
lambda_.Runtime.PYTHON_3_10,
2929
lambda_.Runtime.PYTHON_3_11,
3030
lambda_.Runtime.PYTHON_3_12,
31+
lambda_.Runtime.PYTHON_3_13,
3132
],
3233
)
3334
def test_with_different_python_version_x86_64(python_version):
@@ -64,6 +65,7 @@ def test_with_different_python_version_x86_64(python_version):
6465
lambda_.Runtime.PYTHON_3_10,
6566
lambda_.Runtime.PYTHON_3_11,
6667
lambda_.Runtime.PYTHON_3_12,
68+
lambda_.Runtime.PYTHON_3_13,
6769
],
6870
)
6971
def test_with_different_python_version_arm64(python_version):
@@ -104,7 +106,7 @@ def test_with_custom_name():
104106
template.has_resource_properties(
105107
"AWS::Lambda::LayerVersion",
106108
{
107-
"Description": "Powertools for AWS Lambda (Python) V3 [x86_64 - Python 3.12] with extra dependencies latest version", # noqa E501
109+
"Description": "Powertools for AWS Lambda (Python) V3 [x86_64 - Python 3.13] with extra dependencies latest version", # noqa E501
108110
},
109111
)
110112

@@ -127,7 +129,7 @@ def test_with_extras():
127129
template.has_resource_properties(
128130
"AWS::Lambda::LayerVersion",
129131
{
130-
"Description": "Powertools for AWS Lambda (Python) V3 [x86_64 - Python 3.12] with extra dependencies version 3.0.0", # noqa E501
132+
"Description": "Powertools for AWS Lambda (Python) V3 [x86_64 - Python 3.13] with extra dependencies version 3.0.0", # noqa E501
131133
},
132134
)
133135

@@ -151,7 +153,7 @@ def test_with_extras_arm64():
151153
template.has_resource_properties(
152154
"AWS::Lambda::LayerVersion",
153155
{
154-
"Description": "Powertools for AWS Lambda (Python) V3 [arm64 - Python 3.12] with extra dependencies version 3.0.0", # noqa E501
156+
"Description": "Powertools for AWS Lambda (Python) V3 [arm64 - Python 3.13] with extra dependencies version 3.0.0", # noqa E501
155157
},
156158
)
157159

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ classifiers = [
1414
"Programming Language :: Python :: 3.10",
1515
"Programming Language :: Python :: 3.11",
1616
"Programming Language :: Python :: 3.12",
17+
"Programming Language :: Python :: 3.13",
1718
]
1819
repository = "https://github.com/aws-powertools/powertools-lambda-python"
1920
documentation = "https://docs.powertools.aws.dev/lambda/python/"

tests/e2e/utils/infrastructure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ def create_lambda_functions(
9696
self.create_lambda_functions()
9797
```
9898
99-
Creating Lambda functions and override runtime to Python 3.12
99+
Creating Lambda functions and override runtime to Python 3.13
100100
101101
```python
102102
from aws_cdk.aws_lambda import Runtime
103103
104-
self.create_lambda_functions(function_props={"runtime": Runtime.PYTHON_3_12)
104+
self.create_lambda_functions(function_props={"runtime": Runtime.PYTHON_3_13)
105105
```
106106
"""
107107
if not self._handlers_dir.exists():

0 commit comments

Comments
 (0)