Skip to content

Commit 553e733

Browse files
chore(ci): drop support for Python 3.8 (#5896)
* Dropping Python 3.8 * Dropping Python 3.8 * Dropping Python 3.8 * Dropping Python 3.8
1 parent 792892e commit 553e733

29 files changed

+752
-603
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ body:
5858
attributes:
5959
label: AWS Lambda function runtime
6060
options:
61-
- "3.8"
6261
- "3.9"
6362
- "3.10"
6463
- "3.11"

.github/ISSUE_TEMPLATE/static_typing.yml

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ body:
2525
attributes:
2626
label: AWS Lambda function runtime
2727
options:
28-
- "3.8"
2928
- "3.9"
3029
- "3.10"
3130
- "3.11"

.github/workflows/layer_govcloud.yml

-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
strategy:
4949
matrix:
5050
layer:
51-
- AWSLambdaPowertoolsPythonV3-python38
5251
- AWSLambdaPowertoolsPythonV3-python39
5352
- AWSLambdaPowertoolsPythonV3-python310
5453
- AWSLambdaPowertoolsPythonV3-python311
@@ -94,7 +93,6 @@ jobs:
9493
strategy:
9594
matrix:
9695
layer:
97-
- AWSLambdaPowertoolsPythonV3-python38
9896
- AWSLambdaPowertoolsPythonV3-python39
9997
- AWSLambdaPowertoolsPythonV3-python310
10098
- AWSLambdaPowertoolsPythonV3-python311
@@ -163,7 +161,6 @@ jobs:
163161
strategy:
164162
matrix:
165163
layer:
166-
- AWSLambdaPowertoolsPythonV3-python38
167164
- AWSLambdaPowertoolsPythonV3-python39
168165
- AWSLambdaPowertoolsPythonV3-python310
169166
- AWSLambdaPowertoolsPythonV3-python311

.github/workflows/layer_govcloud_verify.yml

-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
strategy:
2929
matrix:
3030
layer:
31-
- AWSLambdaPowertoolsPythonV3-python38
3231
- AWSLambdaPowertoolsPythonV3-python39
3332
- AWSLambdaPowertoolsPythonV3-python310
3433
- AWSLambdaPowertoolsPythonV3-python311
@@ -59,7 +58,6 @@ jobs:
5958
strategy:
6059
matrix:
6160
layer:
62-
- AWSLambdaPowertoolsPythonV3-python38
6361
- AWSLambdaPowertoolsPythonV3-python39
6462
- AWSLambdaPowertoolsPythonV3-python310
6563
- AWSLambdaPowertoolsPythonV3-python311
@@ -91,7 +89,6 @@ jobs:
9189
strategy:
9290
matrix:
9391
layer:
94-
- AWSLambdaPowertoolsPythonV3-python38
9592
- AWSLambdaPowertoolsPythonV3-python39
9693
- AWSLambdaPowertoolsPythonV3-python310
9794
- AWSLambdaPowertoolsPythonV3-python311

.github/workflows/publish_v3_layer.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy v3 layer to all regions
22

33
# PROCESS
44
#
5-
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for Python3.8-3.12 and x86_64/ARM architectures (uses custom runner as it's CPU heavy)
5+
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for Python3.9-3.13 and x86_64/ARM architectures (uses custom runner as it's CPU heavy)
66
# 2. Kick off pipeline for beta, prod, and canary releases
77
# 3. Create PR to update trunk so staged docs also point to the latest Layer ARN, when merged
88
# 4. Builds and publishes docs with latest Layer ARN using given version (generally coming from release)
@@ -85,7 +85,7 @@ jobs:
8585
strategy:
8686
max-parallel: 5
8787
matrix:
88-
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
88+
python-version: ["3.9","3.10","3.11","3.12","3.13"]
8989
defaults:
9090
run:
9191
working-directory: ./layer_v3

.github/workflows/quality_check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
strategy:
4747
max-parallel: 4
4848
matrix:
49-
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
49+
python-version: ["3.9","3.10","3.11","3.12","3.13"]
5050
env:
5151
PYTHON: "${{ matrix.python-version }}"
5252
permissions:

.github/workflows/reusable_deploy_v3_layer_stack.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy CDK Layer v3 stack
33
# PROCESS
44
#
55
# 1. Split what AWS regions support ARM vs regions that Lambda support ARM
6-
# 2. We build the Lambda layer for 3.8 to 3.12 Python runtime and both x86_64 and arm64 (see `matrix` section)
6+
# 2. We build the Lambda layer for 3.9 to 3.13 Python runtime and both x86_64 and arm64 (see `matrix` section)
77
# 3. Deploy previously built layer for each AWS commercial region
88
# 4. Export all published Layers as JSON
99
# 5. Deploy Canaries to every deployed region to test whether Powertools can be imported etc.
@@ -78,7 +78,7 @@ jobs:
7878
"eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3",
7979
"il-central-1", "me-central-1", "me-south-1", "sa-east-1", "us-east-1",
8080
"us-east-2", "us-west-1", "us-west-2"]
81-
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
81+
python-version: ["3.9","3.10","3.11","3.12","3.13"]
8282
include:
8383
- region: "af-south-1"
8484
has_arm64_support: "true"

.github/workflows/reusable_deploy_v3_sar.yml

+2-2
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.13 Python runtime and both x86_64 and arm64 (see `matrix` section)
7+
# 3. We publish the SAR for 3.9 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
@@ -72,7 +72,7 @@ jobs:
7272
strategy:
7373
matrix:
7474
architecture: ["x86_64", "arm64"]
75-
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
75+
python-version: ["3.9","3.10","3.11","3.12","3.13"]
7676
steps:
7777
- name: checkout
7878
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/run-e2e-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
strategy:
4949
fail-fast: false # needed so if a version fails, the others will still be able to complete and cleanup
5050
matrix:
51-
version: ["3.8", "3.9", "3.10", "3.11", "3.12","3.13"]
51+
version: ["3.9", "3.10", "3.11", "3.12","3.13"]
5252
if: ${{ github.actor != 'dependabot[bot]' && github.repository == 'aws-powertools/powertools-lambda-python' }}
5353
steps:
5454
- name: "Checkout"

.github/workflows/update_ssm.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ run-name: SSM Parameters - Python
1111
# * layer_version: this is sequential layer version from the ARN
1212
#
1313
# A successful parameter would look similar to:
14-
# /aws/service/powertools/python/arm64/python3.8/3.1.0
14+
# /aws/service/powertools/python/arm64/python3.13/3.1.0
1515
# And will have a value of:
1616
# arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:4
1717

@@ -75,14 +75,12 @@ jobs:
7575
env:
7676
prefix: ${{ inputs.environment == 'beta' && '/aws/service/powertools/beta' || '/aws/service/powertools' }}
7777
run: |
78-
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.8/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:${{ inputs.layer_version }}" --type String --overwrite
7978
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.9/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:${{ inputs.layer_version }}" --type String --overwrite
8079
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.10/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-arm64:${{ inputs.layer_version }}" --type String --overwrite
8180
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.11/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-arm64:${{ inputs.layer_version }}" --type String --overwrite
8281
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.12/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:${{ inputs.layer_version }}" --type String --overwrite
8382
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.13/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:${{ inputs.layer_version }}" --type String --overwrite
8483
85-
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.8/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-x86_64:${{ inputs.layer_version }}" --type String --overwrite
8684
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.9/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-x86_64:${{ inputs.layer_version }}" --type String --overwrite
8785
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.10/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86_64:${{ inputs.layer_version }}" --type String --overwrite
8886
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.11/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86_64:${{ inputs.layer_version }}" --type String --overwrite
@@ -94,14 +92,12 @@ jobs:
9492
env:
9593
prefix: ${{ inputs.environment == 'beta' && '/aws/service/powertools/beta' || '/aws/service/powertools' }}
9694
run: |
97-
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.8/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:${{ inputs.layer_version }}" --type String --overwrite
9895
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.9/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:${{ inputs.layer_version }}" --type String --overwrite
9996
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.10/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-arm64:${{ inputs.layer_version }}" --type String --overwrite
10097
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.11/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-arm64:${{ inputs.layer_version }}" --type String --overwrite
10198
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.12/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:${{ inputs.layer_version }}" --type String --overwrite
10299
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.13/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:${{ inputs.layer_version }}" --type String --overwrite
103100
104-
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.8/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-x86_64:${{ inputs.layer_version }}" --type String --overwrite
105101
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.9/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-x86_64:${{ inputs.layer_version }}" --type String --overwrite
106102
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.10/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86_64:${{ inputs.layer_version }}" --type String --overwrite
107103
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.11/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86_64:${{ inputs.layer_version }}" --type String --overwrite

aws_lambda_powertools/utilities/idempotency/serialization/functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
if sys.version_info >= (3, 10):
66
from types import UnionType # Available in Python 3.10+
77
else:
8-
UnionType = Union # Fallback for Python 3.8 and 3.9
8+
UnionType = Union # Fallback for Python 3.9
99

1010
from aws_lambda_powertools.utilities.idempotency.exceptions import (
1111
IdempotencyModelTypeError,

benchmark/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Transform: AWS::Serverless-2016-10-31
44
Globals:
55
Function:
66
Handler: main.handler
7-
Runtime: python3.8
7+
Runtime: python3.13
88
MemorySize: 128
99
Tracing: Active
1010
Environment:

docs/automation.md

+2-9
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ This is a snapshot of our automated checks at a glance.
9494
To build and deploy the Lambda Layers, we run a pipeline with the following steps:
9595

9696
* We fetch the latest PyPi release and use it as the source for our layer.
97-
* We build Python versions ranging from **3.8 to 3.13** for x86_64 and arm64 architectures. This is necessary because we use pre-compiled libraries like **Pydantic** and **Cryptography**, which require specific Python versions for each layer.
97+
* We build Python versions ranging from **3.9 to 3.13** for x86_64 and arm64 architectures. This is necessary because we use pre-compiled libraries like **Pydantic** and **Cryptography**, which require specific Python versions for each layer.
9898
* We provide layer distributions for both the **x86_64** and **arm64** architectures.
9999
* For each Python version, we create a single CDK package containing both x86_64 and arm64 assets to optimize deployment performance.
100100

@@ -106,17 +106,13 @@ Next, we deploy these CDK Assets to the beta account across all AWS regions. Onc
106106

107107
```mermaid
108108
graph LR
109-
Fetch[Fetch PyPi release] --> P38[<strong>Python 3.8</strong>]
110-
Fetch --> P39[<strong>Python 3.9</strong>]
109+
Fetch[Fetch PyPi release] --> P39[<strong>Python 3.9</strong>]
111110
Fetch --> P310[<strong>Python 3.10</strong>]
112111
Fetch --> P311[<strong>Python 3.11</strong>]
113112
Fetch --> P312[<strong>Python 3.12</strong>]
114113
Fetch --> P313[<strong>Python 3.13</strong>]
115114
116115
subgraph build ["LAYER BUILD"]
117-
P38 --> P38x86[build x86_64]
118-
P38 --> P38arm64[build arm64]
119-
120116
P39 --> P39x86[build x86_64]
121117
P39 --> P39arm64[build arm64]
122118
P310 --> P310x86[build x86_64]
@@ -127,8 +123,6 @@ graph LR
127123
P312 --> P312arm64[build arm64]
128124
P313 --> P313x86[build x86_64]
129125
P313 --> P313arm64[build arm64]
130-
P38x86 --> CDKP1[CDK Package]
131-
P38arm64 --> CDKP1[CDK Package]
132126
P39x86 --> CDKP2[CDK Package]
133127
P39arm64 --> CDKP2[CDK Package]
134128
P310x86 --> CDKP3[CDK Package]
@@ -142,7 +136,6 @@ graph LR
142136
end
143137
144138
subgraph beta ["BETA (all regions)"]
145-
CDKP1 --> DeployBeta[Deploy to Beta]
146139
CDKP2 --> DeployBeta
147140
CDKP3 --> DeployBeta
148141
CDKP4 --> DeployBeta

docs/contributing/setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ graph LR
2525
Unless you're using the pre-configured Cloud environment, you'll need the following installed:
2626

2727
* [GitHub account](https://github.com/join){target="_blank" rel="nofollow"}. You'll need to be able to fork, clone, and contribute via pull request.
28-
* [Python 3.8+](https://www.python.org/downloads/){target="_blank" rel="nofollow"}. Pick any version supported in [AWS Lambda runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
28+
* [Python 3.9+](https://www.python.org/downloads/){target="_blank" rel="nofollow"}. Pick any version supported in [AWS Lambda runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
2929
* [Docker](https://docs.docker.com/engine/install/){target="_blank" rel="nofollow"}. We use it to run documentation linters and non-Python tooling.
3030
* [Fork the repository](https://github.com/aws-powertools/powertools-lambda-python/fork). You'll work against your fork of this repository.
3131

0 commit comments

Comments
 (0)