3

The specific error in question is


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

  on ../../../../module/data-platform-sftp/auth_lambda.tf line 30, in resource "aws_lambda_function" "auth_lambda":
  30:   runtime = var.lambda_runtime_context

I'm running Terraform 0.12.31. Why is python 3.9 missing from the runtime contexts when AWS says it supports it here?

AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103

1 Answers1

9

As we can see in the AWS docs python3.9 is a valid lambda runtime.

enter image description here

Looking at the AWS provider changelog.md for terraform it looks like the python3.9 runtime was added in the 3.55.0 (August 19, 2021) release for the AWS provider. This means if you've pinned the provider you'll need to update to a more recent version to use this runtime.

AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103