terraform-aws-modules/terraform-aws-lambda

python3.11 is not allowed for the runtime

parviste-fortum opened this issue · 2 comments

Description

AWS recently added support for Python 3.11 for the runtime. However, this module does allow using it, and instead produces an error.

  • [ X ] ✋ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version: 6.0

  • Terraform version: Terraform v1.5.5

  • Provider version(s): v4.67.0

Reproduction Code

module "lambda_function" {
  source  = "terraform-aws-modules/lambda/aws"
  version = "6.0.0"

  publish = true

  function_name = "my-function"
  handler       = "lambda_function.lambda_handler"
  runtime       = "python3.11"

  source_path = [
        {
            path = "${path.module}/src/lambda"
            pip_requirements = true
        }
    ]
}

Steps to reproduce the behavior:

Expected behavior

Lambda is deployed using the Python 3.11 runtime.

Actual behavior

An error: 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.11

Apologies, actually it was due to the outdated aws provider

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.