terraform-aws-modules / terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/lambda/aws
Apache License 2.0
886 stars 656 forks source link

python3.11 is not allowed for the runtime #498

Closed parviste-fortum closed 9 months ago

parviste-fortum commented 9 months ago

Description

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

Versions

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

parviste-fortum commented 9 months ago

Apologies, actually it was due to the outdated aws provider

github-actions[bot] commented 8 months ago

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.