Assistance Required for AWS Lambda Runtime Upgrade via Terraform

Hi Team,

As recommended by AWS, we are planning to upgrade our Lambda function runtime from the legacy Python 3.8/3.9 versions, as these versions have been deprecated and are no longer supported by AWS.

Our Lambda functions are deployed and managed through Terraform. We attempted to upgrade the runtime from Python 3.9 to Python 3.13 (or Python 3.14); however, we encountered the error shown in the attached screenshot

We are unsure whether Python 3.13 or Python 3.14 is currently supported for AWS Lambda when deployed via Terraform, or if additional Terraform provider updates are required.

Could you please assist us in identifying the root cause and guide us on the correct approach to successfully upgrade the Lambda runtime?

Can you please post the error as text? There was no attached screenshot and we’d prefer text over a screenshot anyway. Thanks.

Hi @CraigW ,

Please find the error details below for reference.

Error: expected runtime to be one of [nodejs nodejs4.3 nodejs6.10 nodejs8.10 nodejs10.x nodejs12.x nodejs14.x nodejs16.x java8 java8.al2 java11 python2.7 python3.6 python3.7 python3.8 python3.9 dotnetcore1.0 dotnetcore2.0 dotnetcore2.1 dotnetcore3.1 dotnet6 nodejs4.3-edge go1.x ruby2.5 ruby2.7 provided provided.al2 nodejs18.x python3.10 java17], got python3.13

with aws_lambda_function.patchbaseline-lambda,

on patch_baseline_lambda.tf line 15, in resource "aws_lambda_function" "patchbaseline-lambda":

15:   runtime           =   "python3.13"

time=2026-06-28T16:04:34Z level=error msg=Terraform invocation failed in /opt/gitlab-

time=2026-06-28T16:04:34Z level=error msg=1 error occurred:

\* exit status 1

The set of possible runtimes is validated client-side based on an enumeration that’s provided as part of the AWS SDK for Go, in types.Runtime.

This means that which runtimes are accepted depends on which version of the AWS provider you are running. Since the list returned in the error message is missing some of the newer runtimes, I expect you’ll need to update to a newer version of the provider which in turn uses a newer version of the AWS SDK for Go.