Terraform-provider-aws: AWS Lambda support for Java 11, Node.js 12 and Python 3.8

Created on 19 Nov 2019  ·  11Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

You can now develop AWS Lambda functions using Java 11.
You can now author your AWS Lambda functions in Node.js 12.
You can now develop your AWS Lambda functions using Python 3.8.

New or Affected Resource(s)

Potential Terraform Configuration

resource "aws_lambda_function" "example" {
  runtime = "python3.8"
}

References

Announcements:

enhancement serviclambda

Most helpful comment

Support for aws_lambda_function has been merged and will release in version 2.39.0 of the Terraform AWS Provider, likely tomorrow. Will reopen to allow for aws_lambda_layer_version implementation.

All 11 comments

As of AWS SDK v1.25.37 there are no SDK constants for these new runtime values.

@ewbankkit If I understand correctly then this would mean that we just need to drop the runtime validations completely from this provider and it should work. Or am I missing something?

@ewbankkit, it seems that v1.25.38 adds this

@ewbankkit
Can we also add aws_lambda_layer_version as an affected resource? It also requires a runtime input.

resource "aws_lambda_layer_version" "imagemagick_layer" {
  filename   = "../layers-files/vdem-imagemagick-layer.zip"
  layer_name = "node12-imagemagick-layer"

  source_code_hash = "${filebase64sha256("../layers-files/node12-imagemagick-layer.zip")}"

  compatible_runtimes = ["nodejs12 .x"]
}

Error: aws_lambda_layer_version.imagemagick_layer: expected compatible_runtimes.0 to be one of [dotnetcore1.0 dotnetcore2.0 dotnetcore2.1 go1.x java8 nodejs4.3 nodejs4.3-edge nodejs6.10 nodejs8.10 nodejs10.x provided python2.7 python3.6 python3.7 ruby2.5], got nodejs12.x

@mischuler Added aws_lambda_layer_version as affected resource (and data source); Thanks.
Also added a note to the PR - https://github.com/terraform-providers/terraform-provider-aws/pull/10938.

Support for aws_lambda_function has been merged and will release in version 2.39.0 of the Terraform AWS Provider, likely tomorrow. Will reopen to allow for aws_lambda_layer_version implementation.

Hi folks 👋 The runtime validation is actually shared between both aws_lambda_function and aws_lambda_layer_version resources and we have verified the updated validation in the latter resource as well. The CHANGELOG is updated to reflect both these resources receiving this update and this will release later today in version 2.39.0. 👍

This has been released in version 2.39.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings