Skip to content

Commit 1e2c285

Browse files
chore: update the terminate-agent-hook lambda to Python 3.13 with Arm/Graviton2 (#1266)
## Description This pull request updates the `terminate-agent-hook` Lambda function to use Python 3.13 and the Arm64 architecture (Graviton2). Lambda functions powered by Graviton2 are designed to deliver up to 19% better performance at 20% lower cost, improving both efficiency and cost-effectiveness. The change also updates the required AWS provider version to `>= 5.76` to ensure compatibility with the latest AWS resources and services. --------- Co-authored-by: Matthias Kay <github@matthiaskay.de>
1 parent c8180ba commit 1e2c285

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/terminate-agent-hook/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ resource "aws_lambda_function" "terminate_runner_instances" {
5151
# checkov:skip=CKV_AWS_115:We do not assign a reserved concurrency as this function can't be called by users
5252
# checkov:skip=CKV_AWS_116:We should think about having a dead letter queue for this lambda
5353
# checkov:skip=CKV_AWS_272:Code signing would be a nice enhancement, but I guess we can live without it here
54-
architectures = ["x86_64"]
54+
architectures = ["arm64"]
5555
description = "Lifecycle hook for terminating GitLab runner agent instances"
5656
filename = data.archive_file.terminate_runner_instances_lambda.output_path
5757
source_code_hash = data.archive_file.terminate_runner_instances_lambda.output_base64sha256
@@ -61,7 +61,7 @@ resource "aws_lambda_function" "terminate_runner_instances" {
6161
package_type = "Zip"
6262
publish = true
6363
role = aws_iam_role.lambda.arn
64-
runtime = "python3.11"
64+
runtime = "python3.13"
6565
timeout = var.timeout
6666
kms_key_arn = var.kms_key_id
6767

modules/terminate-agent-hook/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33

44
required_providers {
55
aws = {
6-
version = ">= 4.0.0"
6+
version = ">= 5.76"
77
source = "hashicorp/aws"
88
}
99
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.26"
7+
version = ">= 5.76"
88
}
99
local = {
1010
source = "hashicorp/local"

0 commit comments

Comments
 (0)