Skip to content

Commit ba1039c

Browse files
[AWSX-1559] feat: update Python version to 3.13 (#924)
* [AWSX-1559] feat: update Python version to 3.13 * [AWSX-1559] feat: update version * [AWSX-1559] feat: bump cfn-lint to 1.19.0 * [AWSX-1559] feat: use ddtrace v3.0.0 * [AWSX-1559] chore: update python version in docs * [AWSX-1559] refactor: update requirements for ddd-lambda, dd, ddtrace * [AWSX-1559] chore: update version in docs for next forwarder version * [AWSX-1559] refactor: apply doc suggestion
1 parent 2871fe6 commit ba1039c

File tree

16 files changed

+30
-27
lines changed

16 files changed

+30
-27
lines changed

.github/workflows/aws_integration_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828

2929
- name: AWS Python integration tests
3030
run: |
31-
./aws/logs_monitoring/tools/integration_tests/integration_tests.sh --python-version=3.12
31+
./aws/logs_monitoring/tools/integration_tests/integration_tests.sh --python-version=3.13

.github/workflows/aws_lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Setup Python
1212
uses: actions/setup-python@v3
1313
with:
14-
python-version: "3.12"
14+
python-version: "3.13"
1515

1616
- name: Install pip
1717
run: |
@@ -33,7 +33,7 @@ jobs:
3333
3434
- name: Install cfn-lint print version and check formatting
3535
run: |
36-
pip install cfn-lint==1.11.1
36+
pip install cfn-lint==1.19.0
3737
cfn-lint --version
3838
cfn-lint -t aws/logs_monitoring/template.yaml
3939
cfn-lint -t aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml

.github/workflows/aws_unit_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
steps:
99
- name: Checkout source
1010
uses: actions/checkout@v3
11-
- name: Setup Python 3.12
11+
- name: Setup Python 3.13
1212
uses: actions/setup-python@v3
1313
with:
14-
python-version: 3.12
14+
python-version: 3.13
1515

1616
- name: AWS Python unit tests
1717
env:

aws/logs_monitoring/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ resource "aws_cloudformation_stack" "datadog_forwarder" {
115115

116116
If you can't install the Forwarder using the provided CloudFormation template, you can install the Forwarder manually following the steps below. Feel free to open an issue or pull request to let us know if there is anything we can improve to make the template work for you.
117117

118-
1. Create a Python 3.12 Lambda function using `aws-dd-forwarder-<VERSION>.zip` from the latest [releases][101].
118+
1. Create a Python 3.13 Lambda function using `aws-dd-forwarder-<VERSION>.zip` from the latest [releases][101].
119119
2. Save your [Datadog API key][102] in AWS Secrets Manager, set environment variable `DD_API_KEY_SECRET_ARN` with the secret ARN on the Lambda function, and add the `secretsmanager:GetSecretValue` permission to the Lambda execution role.
120120
3. If you need to forward logs from S3 buckets, add the `s3:GetObject` permission to the Lambda execution role.
121121
4. Set the environment variable `DD_ENHANCED_METRICS` to `false` on the Forwarder. This stops the Forwarder from generating enhanced metrics itself, but it will still forward custom metrics from other lambdas.DdFetchLambdaTags
@@ -148,8 +148,11 @@ The <a href="#cloudformation-parameters">environment variables provided on this
148148

149149
If you encounter issues upgrading to the latest version, check the Troubleshooting section.
150150

151+
### Upgrade an older verison to 4.12.0+
152+
Starting version 4.12.0+ Lambda function has been updated to require **Python 3.13**. If upgrading an older forwarder installation to 4.12.0+, ensure AWS Lambda function is configured to use Python 3.13
153+
151154
### Upgrade an older verison to 4.3.0+
152-
Starting verison 4.3.0 Lambda forwarder will support a single python version only. The supported Python version of this release is 3.12.
155+
Starting verison 4.3.0 Lambda forwarder will support a single python version only. The supported Python version of this release is 3.12.
153156

154157
### Upgrade an older version to +4.0.0
155158
Starting version 4.0.0 `source`, `service` and `host` identification logic will be pulled out from the Lambda forwarder's code and set in directly in Datadog's backend. The first migrated log source is `RDS`.
@@ -748,7 +751,7 @@ The value of the `service` tag is determined based on multiple inputs. These inp
748751
1. Log message custom tags: If the log message has a `ddtags` key which contains a `service` tag value, it will be used to override the `service` tag in the log event.
749752
2. Lambda tags cache (applicable for Lambda logs only): Activating `DdFetchLambdaTags` will fetch and store all Lambda functions tags and will override the `service` tag if it wasn't set previously or was set to a default value i.e. `source` value.
750753
3. Cloudwatch log group tags cache (applicable for Cloudwatch logs only): Activating `DdFetchLogGroupTags` will fetch and store all Cloudwatch log groups tags which are added to the `ddtags` entry in the log event. If `service` tag value was set in the tags cache it will be used to set the `service` tag for the log event.
751-
4. Directly setting a `service` tag value in the forwarder's `ddtags` ENV var.
754+
4. Directly setting a `service` tag value in the forwarder's `ddtags` ENV var.
752755
5. Default value equal to the `source` tag.
753756

754757

aws/logs_monitoring/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ bytecode
33
cattrs
44
certifi
55
charset-normalizer
6-
datadog-lambda==6.104.0
7-
datadog==0.50.2
6+
datadog-lambda==7.112.0
7+
datadog==0.52.0
88
ddsketch==3.0.1
9-
ddtrace==2.17.3
9+
ddtrace==3.10.2
1010
deprecated
1111
envier
1212
exceptiongroup

aws/logs_monitoring/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
author="Datadog, Inc.",
1313
author_email="dev@datadoghq.com",
1414
classifiers=[
15-
"Programming Language :: Python :: 3.12",
15+
"Programming Language :: Python :: 3.13",
1616
],
1717
keywords="datadog aws lambda layer",
18-
python_requires=">=3.12, <3.13",
18+
python_requires=">=3.13, <3.14",
1919
extras_require={
2020
"dev": ["nose2==0.9.1", "flake8==3.7.9", "requests==2.22.0", "boto3==1.10.33"]
2121
},

aws/logs_monitoring/template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ Resources:
432432
- {DdForwarderVersion: !FindInMap [Constants, DdForwarder, Version]}
433433
- ZipFile: " "
434434
MemorySize: !Ref MemorySize
435-
Runtime: python3.12
435+
Runtime: python3.13
436436
Architectures:
437437
- arm64
438438
Timeout: !Ref Timeout
@@ -843,7 +843,7 @@ Resources:
843843
Properties:
844844
Description: Copies Datadog Forwarder zip to the destination S3 bucket
845845
Handler: index.handler
846-
Runtime: python3.12
846+
Runtime: python3.13
847847
Timeout: 600
848848
Code:
849849
ZipFile: |

aws/logs_monitoring/tools/build_bundle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ else
4242
VERSION=$1
4343
fi
4444

45-
PYTHON_VERSION="${PYTHON_VERSION:-3.12}"
45+
PYTHON_VERSION="${PYTHON_VERSION:-3.13}"
4646
FORWARDER_PREFIX="aws-dd-forwarder"
4747
FORWARDER_DIR="../.forwarder"
4848

aws/logs_monitoring/tools/integration_tests/cache_test_lambda/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
service: integration-tests
22
provider:
33
name: aws
4-
runtime: python3.12
4+
runtime: python3.13
55

66
functions:
77
cache_test_lambda:

aws/logs_monitoring/tools/integration_tests/integration_tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
set -e
99

10-
PYTHON_VERSION="python3.12"
11-
PYTHON_VERSION_TAG="3.12"
12-
PYTHON_IMAGE="python:3.12"
10+
PYTHON_VERSION="python3.13"
11+
PYTHON_VERSION_TAG="3.13"
12+
PYTHON_IMAGE="python:3.13"
1313
SKIP_FORWARDER_BUILD=false
1414
UPDATE_SNAPSHOTS=false
1515
LOG_LEVEL=info
@@ -36,7 +36,7 @@ for arg in "$@"; do
3636
SKIP_FORWARDER_BUILD=true
3737
shift
3838
;;
39-
39+
4040

4141
# -u or --update
4242
# Update the snapshots to reflect this test run

0 commit comments

Comments
 (0)