Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOL node engine 6.10 of lambda function #9341

Merged
merged 5 commits into from Jul 16, 2019

Conversation

@chaspy
Copy link
Contributor

commented Jul 15, 2019

Community Note

  • Please vote on this pull request by adding a πŸ‘ reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #0000 Seems that the issue has not been reported

I faced the following error: (refer: https://www.terraform.io/docs/providers/aws/r/lambda_permission.html#example-usage)

   β”‚ Error: Error creating Lambda function: InvalidParameterValueException: The runtime parameter of nodejs6.10 is no longer supported for creating or updating AWS Lambda functions. We re
       β”‚ commend you use the new runtime (nodejs10.x) while creating or updating functions.
   β”‚ /Users/take/go/src/github.com/hashicorp/terraform/states/statemgr/filesystem.go:349: [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
   β”‚     status code: 400, request id: 26c1b11c-e092-45d3-bb9f-18d685d26727

Unfortunately, nodejs6.10 was EOL on April 30, 2019
ref: https://aws.amazon.com/blogs/developer/node-js-6-is-approaching-end-of-life-upgrade-your-aws-lambda-functions-to-the-node-js-10-lts/

Release note for CHANGELOG:


None of FEATURES, ENHANCEMENT and BUG FIX. This is just updating doc and test.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSLambdaFunction_updateRuntime'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSLambdaFunction_updateRuntime -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSLambdaFunction_updateRuntime
=== PAUSE TestAccAWSLambdaFunction_updateRuntime
=== CONT  TestAccAWSLambdaFunction_updateRuntime
--- PASS: TestAccAWSLambdaFunction_updateRuntime (87.40s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	87.465s

chaspy added some commits Jul 15, 2019

Update compatible node runtime
nodejs6.10 was EOL on April 30, 2019
ref: https://aws.amazon.com/blogs/developer/node-js-6-is-approaching-end-of-life-upgrade-your-aws-lambda-functions-to-the-node-js-10-lts/

cmd: git grep nodejs6.10 | cut -d ':' -f1 | xargs sed -i.bak -e 's/nodejs6.10/nodejs8.10/g'

@chaspy chaspy marked this pull request as ready for review Jul 15, 2019

@chaspy chaspy requested a review from terraform-providers/aws-provider as a code owner Jul 15, 2019

@bflad
Copy link
Member

left a comment

Hi @chaspy πŸ‘‹ Thank you for contributing these fixes. Please see the two items below and reach out if you have any questions or do not have time to implement the changes.

@@ -1724,7 +1724,7 @@ resource "aws_lambda_function" "lambda_function_test" {
function_name = "%s"
role = "${aws_iam_role.iam_for_lambda.arn}"
handler = "exports.example"
runtime = "nodejs6.10"
runtime = "nodejs8.10"

This comment has been minimized.

Copy link
@bflad

bflad Jul 16, 2019

Member

The TestAccAWSLambdaFunction_updateRuntime test that references this test configuration should be performing an update of the runtime argument and this change will make the runtime value the same as the first test step. Can you please update this to another runtime value (e.g. nodejs10.x) and ensure the test check matches the new value? Thanks.

This comment has been minimized.

Copy link
@chaspy

chaspy Jul 16, 2019

Author Contributor

Addressed: ccfd957

@@ -345,7 +345,7 @@ resource "aws_lambda_layer_version" "lambda_layer_test" {
filename = "test-fixtures/lambdatest.zip"
layer_name = "%s"
compatible_runtimes = ["nodejs8.10", "nodejs6.10"]

This comment has been minimized.

Copy link
@bflad

bflad Jul 16, 2019

Member

The TestAccAWSLambdaLayerVersion_compatibleRuntimes test that references this test configuration is currently expecting two values for the compatible_runtimes argument:

resource.TestCheckResourceAttr(resourceName, "compatible_runtimes.#", "2"),

Can you please add back a second runtime, e.g. nodejs10.x

This comment has been minimized.

Copy link
@chaspy

chaspy Jul 16, 2019

Author Contributor

Addressed: 95128f1

@bflad bflad self-assigned this Jul 16, 2019

@chaspy chaspy force-pushed the chaspy:chaspy/eol-lambda-nodejs6-10 branch from 1f62607 to 95128f1 Jul 16, 2019

@chaspy

This comment has been minimized.

Copy link
Contributor Author

commented Jul 16, 2019

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSLambdaFunction_updateRuntime'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSLambdaFunction_updateRuntime -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSLambdaFunction_updateRuntime
=== PAUSE TestAccAWSLambdaFunction_updateRuntime
=== CONT  TestAccAWSLambdaFunction_updateRuntime
--- PASS: TestAccAWSLambdaFunction_updateRuntime (88.75s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	88.816s

@hashibot hashibot bot removed the waiting-response label Jul 16, 2019

@chaspy

This comment has been minimized.

Copy link
Contributor Author

commented Jul 16, 2019

@bflad thank you for your review! Ready for review again πŸ‘

@bflad bflad added this to the v2.20.0 milestone Jul 16, 2019

@bflad

bflad approved these changes Jul 16, 2019

Copy link
Member

left a comment

LGTM, thanks, @chaspy! πŸš€

--- PASS: TestAccAWSLambdaFunction_updateRuntime (79.24s)

--- PASS: TestAccAWSLambdaLayerVersion_compatibleRuntimes (19.91s)

--- PASS: TestAccAWSPinpointApp_CampaignHookLambda (30.43s)

@bflad bflad merged commit ee671e2 into terraform-providers:master Jul 16, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.