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

Upgrade all Lambda runtimes from Node 8.10 #207

Closed
douglasnaphas opened this issue Oct 18, 2019 · 9 comments
Closed

Upgrade all Lambda runtimes from Node 8.10 #207

douglasnaphas opened this issue Oct 18, 2019 · 9 comments

Comments

@douglasnaphas
Copy link
Owner

douglasnaphas commented Oct 18, 2019

I got an email 2019-10-18 saying:

Hello,

We are contacting you as we have identified that your AWS Account currently has one or more Lambda functions using Node.js 8.10, which will reach its EOL at the end of 2019.

What’s happening?

The Node community has decided to end support for Node.js 8.x on December 31, 2019 [1]. From this date forward, Node.js 8.x will stop receiving bug fixes, security updates, and/or performance improvements. To ensure that your new and existing functions run on a supported and secure runtime, language runtimes that have reached their EOL are deprecated in AWS [2].

For Node.js 8.x, there will be 2 stages to the runtime deprecation process:

  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

After this period, both function creation and updates will be disabled permanently. However, existing Node 8.x functions will still be available to process invocation events.

What do I need to do?

We encourage you to update all of your Node.js 8.10 functions to the newer available runtime version, Node.js 10.x[3]. You should test your functions for compatibility with the Node.js 10.x language version before applying changes to your production functions.

What if I have issues/What if I need help?

Please contact us through AWS Support [4] or the AWS Developer Forums [5] should you have any questions or concerns.

[1] https://github.com/nodejs/Release
[2] https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html
[3] https://aws.amazon.com/about-aws/whats-new/2019/05/aws_lambda_adds_support_for_node_js_v10/
[4] https://aws.amazon.com/support
[5] https://forums.aws.amazon.com/forum.jspa?forumID=186

Sincerely,
Amazon Web Services

Amazon Web Services, Inc. is a subsidiary of Amazon.com, Inc. Amazon.com is a registered trademark of Amazon.com, Inc. This message was produced and distributed by Amazon Web Services Inc., 410 Terry Ave. North, Seattle, WA 98109-5210


Reference: https://phd.aws.amazon.com/phd/home#/event-log?Event%20ARN=arn:aws:health:global::event/LAMBDA/AWS_LAMBDA_OPERATIONAL_NOTIFICATION/AWS_LAMBDA_OPERATIONAL_NOTIFICATION_ae321592-3fd8-4077-99e5-ed1a274e83c3&eventID=arn:aws:health:global::event/LAMBDA/AWS_LAMBDA_OPERATIONAL_NOTIFICATION/AWS_LAMBDA_OPERATIONAL_NOTIFICATION_ae321592-3fd8-4077-99e5-ed1a274e83c3&eventTab=details&layout=vertical

@douglasnaphas
Copy link
Owner Author

Looks like I have to set enabled=0 in the priorities.conf file as suggested here in order for sudo yum update -y (recommended here in SAM CLI install instructions, which I'm using to upgrade SAM CLI).

@douglasnaphas
Copy link
Owner Author

When running locally on the MLJSAPI Cloud9 instance with the Node runtime set to 12.x, I got

2019-12-01 21:03:16 Mounting DB at http://172.31.41.172:3003/db [OPTIONS, GET, POST]
2019-12-01 21:03:16 You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions changes will be reflected instantly/automatically. You only need to restart SAM CLI if you update your AWS SAM template
2019-12-01 21:03:16  * Running on http://172.31.41.172:3003/ (Press CTRL+C to quit)
2019-12-01 21:04:23 Invoking index.handler (nodejs12.x)
2019-12-01 21:04:23 Exception on /scripts [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/site-packages/samcli/local/apigw/local_apigw_service.py", line 140, in _request_handler
    self.lambda_runner.invoke(route.function_name, event, stdout=stdout_stream, stderr=self.stderr)
  File "/usr/local/lib/python2.7/site-packages/samcli/commands/local/lib/local_lambda.py", line 75, in invoke
    self.local_runtime.invoke(config, event, debug_context=self.debug_context, stdout=stdout, stderr=stderr)
  File "/usr/local/lib/python2.7/site-packages/samcli/local/lambdafn/runtime.py", line 81, in invoke
    debug_options=debug_context)
  File "/usr/local/lib/python2.7/site-packages/samcli/local/docker/lambda_container.py", line 64, in __init__
    raise ValueError("Unsupported Lambda runtime {}".format(runtime))
ValueError: Unsupported Lambda runtime nodejs12.x
2019-12-01 21:04:23 98.115.252.4 - - [01/Dec/2019 21:04:23] "GET /scripts HTTP/1.1" 502 -

I think this means that I need to upgrade the installation of SAM CLI on the Cloud9 instance.

@douglasnaphas
Copy link
Owner Author

The tests pass with Node 12 on the MLJSAPI Cloud9 instance.

@douglasnaphas
Copy link
Owner Author

Based on this, this, and this, it seems I cannot use Cloud9 for serverless development with Node any longer.

@douglasnaphas
Copy link
Owner Author

I'm going to try running SAM CLI from my Mac.

@douglasnaphas
Copy link
Owner Author

TODO

@douglasnaphas
Copy link
Owner Author

douglasnaphas commented Dec 8, 2019

@douglasnaphas
Copy link
Owner Author

All the Lambdas in MLJSAPI are upgraded to Node 12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant