Skip to content
This repository has been archived by the owner on Oct 22, 2022. It is now read-only.

Default Node v4.3 End-of-Life'ed #107

Open
adamneilson opened this issue May 13, 2018 · 4 comments
Open

Default Node v4.3 End-of-Life'ed #107

adamneilson opened this issue May 13, 2018 · 4 comments

Comments

@adamneilson
Copy link

I understand from the README that io.nervous/lein-cljs-lambda 0.6.0 defaults the runtime of deployed functions to nodejs4.3. However, I received the following message from AWS

Your AWS Account currently has one or more Lambda functions configured to use the Node.js v4.3 runtime. The Node Foundation declared End-of-Life (EOL) for Node.js v4 on April 30, 2018. As a result, this version of Node.js is no longer receiving bug fixes, security updates, or performance improvements from the Node Foundation. Per the AWS Lambda runtime support policy [2] , language runtimes that have been end-of-lifed by the supplier are deprecated in AWS Lambda. While invocations of Lambda functions configured to use Node.js v4.3 will continue to work normally, the ability to create new Lambda functions configured to use the Node.js v4.3 runtime will be disabled on July 31, 2018. Code updates to existing functions using Node.js v4.3 will be disabled on October 31, 2018. We strongly encourage you to update all your functions to a newer version of Node.js (v6.10 or v8.10) so that you continue to benefit from important security, performance, and functionality enhancements offered by the Node Foundation via more recent releases.

The README states this can be overriden with :runtime in the fn-spec or on the command-line. Does this mean something like this in the project.clj?

  :cljs-lambda
  {:defaults      {:role "FIXME"}
   :resource-dirs ["static"]
   :functions
   [{:name   "work-magic"
     :runtime  "nodejs8.10"
     :invoke example.core/work-magic}]}

If not, can anyone give me some guidance?

Given that functions using Node 4.3 will be disabled by the end of October, it might be prudent to default to a newer version of Node and let people set the :runtime back to v4.3 if they really need it?

@moea
Copy link
Member

moea commented May 13, 2018

It seems like only yesterday that I upgraded it to 4.3!

Yeah, so doing that in project.clj will DTRT. If you run lein cljs-lambda update-config after making those changes, the runtime change ought to be reflected remotely.

I would happily accept a pull request to change the default, or else I'll get to it shortly.

If you're doing anything involved in terms of service structure, you want to consider using Serverless to deploy your cljs-lambda functions, with serverless-cljs-plugin.

@prees1
Copy link

prees1 commented Oct 4, 2018

I see this has been resolved in #109 - What is the best way to utilize this, I don't see a new release.

Should I reference this repo in the project.clj file? (I've never done that)

I also couldn't get the :functions key to work, as described in the initial post.

Sorry if this is all obvious, but I am not a pro with cljs-lambda or a lot of this tooling.

Thanks!

@moea
Copy link
Member

moea commented Oct 4, 2018

I should make a release.

@phunanon
Copy link

Nodejs 4.3 is still being used on my machine.

lein new cljs-lambda my-lambda-project
cd my-lambda-project
lein cljs-lambda default-iam-role
lein cljs-lambda deploy

Output:

...
aws lambda get-function-configuration --function-name work-magic
aws lambda create-function --role arn:aws:iam::xxxxxxxxxxxx:role/cljs-lambda-default --output text --runtime nodejs4.3 --zip-file fileb:///tmp/my-lambda-project/target/my-lambda-project/my-lambda-project.zip --query Version --handler index.my_lambda_project_core_SLASH_work_magic --function-name work-magic

An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: The runtime parameter of nodejs4.3 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs10.x) while creating or updating functions.

Apologies if I should open a new issue for this.

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

No branches or pull requests

4 participants