Terraform-provider-aws: Cannot create Lambda functions with Node.js 8.10 runtime

Created on 7 Jan 2020  ·  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 other comments that do not add relevant new information or questions, 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

While working on acceptance tests for https://github.com/terraform-providers/terraform-provider-aws/pull/11368 I got this error:

--- FAIL: TestAccAWSPinpointApp_CampaignHookLambda (12.34s)
    testing.go:640: Step 0 error: errors during apply:

        Error: Error creating Lambda function: InvalidParameterValueException: The runtime parameter of nodejs8.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs12.x) while creating or updating functions.
            status code: 400, request id: 1dc25886-3ba1-4268-ad26-4051664355e0

          on /var/folders/4j/lf5jdq5j4y91g80ytf6qzjwmk6drp5/T/tf-test982036154/main.tf line 15:
          (source code not available)

As announced here and documented here, lambdas with Node.js 8.10 runtime cannot be created after January 6, 2020 (or updated after February 3, 2020).

We have many acceptance tests with runtime = "nodejs8.10" that will need to be updated.

Also, after 2/3/2020 we should remove lambda.RuntimeNodejs810 (and other deprecated runtimes) as a valid value for the aws_lambda_function.runtime attribute.

needs-triage

Most helpful comment

In template.yaml file change Runtime8.10 to Runtime: nodejs12.x and it should work.

I had same issue,
I just needed update me CLI amplify. (npm install -g @aws-amplify/cli)

I hope this help.

All 11 comments

Im getting this error - but not sure how to fix ....

Im having issues with this with aws-amplify

Same here. Changed my cloudformation-template.yml to Runtime: nodejs12.x under Type: 'AWS::Lambda::Function'.

I am wondering if there is another lambda that now requires the Runtime?

I’ll look into soon

On Thursday, January 9, 2020, Brian Dinga notifications@github.com wrote:

Same here. Changed my cloudformation-template.yml to Runtime: nodejs12.x
under Type: 'AWS::Lambda::Function'.

I am wondering if there is another lambda that now requires the Runtime?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/terraform-providers/terraform-provider-aws/issues/11514?email_source=notifications&email_token=AJTDR3TW2SDKLHTOTAE5L7TQ445YTA5CNFSM4KD36OHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIQUUII#issuecomment-572607009,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJTDR3VQGL6ETCPB4HFYH4TQ445YTANCNFSM4KD36OHA
.

@TheReactGuys ,

Hope you find this. amplify-cli/issues/3149

Mines working now. Weird I had v4.11 of the amplify cli... was able to create a new instance. Maybe just an issue with existing instances. Anyways anyone googling hope you find this. Just make sure the version is nodejs12.x in the yaml not nodejs10.x and v4.11 is important

It is because node 8.10 is not going to be supported anymore.

  1. Disable Function Create – Beginning January 6, 2020, customers will no longer be able to create functions using Node.js 8.10

  2. Disable Function Update – Beginning February 3, 2020, customers will no longer be able to update functions using Node.js 8.10

You can update your runtime later version of your nodejs. Also you may need to update your aws provider

In template.yaml file change Runtime8.10 to Runtime: nodejs12.x and it should work.

In template.yaml file change Runtime8.10 to Runtime: nodejs12.x and it should work.

I had same issue,
I just needed update me CLI amplify. (npm install -g @aws-amplify/cli)

I hope this help.

Just to add some additional helpers for others --

I updated the Amplify CLI(npm install -g @aws-amplify/cli) and then reran 'amplify init' with the new CLI. I had to hardcode updates in the yml files where 'nodejs8.10' was previously and automatically coming back in during 'amplify push'. Overwriting 'nodejs8.0' with 'node12.x' then rerunning 'amplify push' gives me a clean backend deploy.

Clean 'amplify push' for me now, thanks to all above.

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