diff --git a/modules/metadata-service/README.md b/modules/metadata-service/README.md
index cbed1ef..ce2da96 100644
--- a/modules/metadata-service/README.md
+++ b/modules/metadata-service/README.md
@@ -30,6 +30,7 @@ If the `access_list_cidr_blocks` variable is set, only traffic originating from
| [metadata\_service\_cpu](#input\_metadata\_service\_cpu) | ECS task CPU unit for metadata service | `number` | `512` | no |
| [metadata\_service\_memory](#input\_metadata\_service\_memory) | ECS task memory in MiB for metadata service | `number` | `1024` | no |
| [metaflow\_vpc\_id](#input\_metaflow\_vpc\_id) | ID of the Metaflow VPC this SageMaker notebook instance is to be deployed in | `string` | n/a | yes |
+| [python\_runtime](#input\_python\_runtime) | Python runtime to be used by lambdas | `string` | `"python3.12"` | no |
| [rds\_master\_instance\_endpoint](#input\_rds\_master\_instance\_endpoint) | The database connection endpoint in address:port format | `string` | n/a | yes |
| [resource\_prefix](#input\_resource\_prefix) | Prefix given to all AWS resources to differentiate between applications | `string` | n/a | yes |
| [resource\_suffix](#input\_resource\_suffix) | Suffix given to all AWS resources to differentiate between environment and workspace | `string` | n/a | yes |
diff --git a/modules/metadata-service/lambda.tf b/modules/metadata-service/lambda.tf
index af5fce8..7767e8e 100644
--- a/modules/metadata-service/lambda.tf
+++ b/modules/metadata-service/lambda.tf
@@ -113,7 +113,7 @@ EOF
resource "aws_lambda_function" "db_migrate_lambda" {
function_name = local.db_migrate_lambda_name
handler = "index.handler"
- runtime = "python3.12"
+ runtime = var.python_runtime
memory_size = 128
timeout = 900
description = "Trigger DB Migration"
diff --git a/modules/metadata-service/variables.tf b/modules/metadata-service/variables.tf
index b38f99c..9e9cb67 100644
--- a/modules/metadata-service/variables.tf
+++ b/modules/metadata-service/variables.tf
@@ -126,3 +126,9 @@ variable "with_public_ip" {
type = bool
description = "Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1_id and subnet2_id, and false otherwise"
}
+
+variable "python_runtime" {
+ type = string
+ default = "python3.12"
+ description = "Python runtime to be used by lambdas"
+}