Node 6 EOL + upgrade lambda functions to node v8

Hi there,

on April 2019 AWS will end support for Node 6.x for lambda functions, as they notified on the console https://nodejs.org/en/blog/release/v6.9.0/

We have two timerLauncher lambda functions for gen2 apps and one cronFunction for a gen1 app. The convox rack is at version 20190304140515.

What’s the best practice here? Is there going to be a convox rack release to which we can upgrade to or are we supposed to upgrade lambdas on AWS console manually?

Also interested to know how we should upgrade this, or will it be automatic?

Hi @matt. Updating your rack to [20190327110531] Lambda Node.js Update, Local Rack Updates should solve this issue.

Confirmed that after rack update and a new application promote the lambda is also updated

Hi @ali, I’ve updated my rack to the latest version, and have deployed a new release for my application. That updated the Node version for the timers, but I still have a Lambda function running on Node 6: production-console-******-Forwarder-******.

It connects to SNS and CloudWatch Logs, and has the following code:

var https = require("https");
var url = require("url");
exports.handler = (event, context, cb) => {
  var req = https.request(Object.assign(url.parse(process.env.WEBHOOK_URL), { method:"POST" }), function(res) {;
    cb(null);
  });
  req.write(event.Records[0].Sns.Message);
  req.end();
}

When I run convox rack resources, I see these webhooks:

console-************  webhook   running
convox-events         webhook   running

So I think it might be one of these.

How could I update this function to use Node 8?

I just figured out how to manually update it. (The following steps use abcdef as an example.)

I ran: convox rack resources info console-abcdef, which gave me this output:

Name     console-abcdef
Type     webhook
Status   running
Options  Url=https://console.convox.com/racks/********-abcdef/events
URL      https://console.convox.com/racks/********-abcdef/events

Then I ran:

convox rack resources update console-abcdef Url=https://console.convox.com/racks/********-abcdef/events

(Using the same Url from the output.)

This forced Convox to update the webhook Lambda function (with the same URL), but it deleted the old one and created a new one running on Node.js 8.10.

I guess that’s a rack resource of webhooks type. We never had those, therefore doing a convox releases promote <latest release ID> for an app was all we needed to update all Lambdas to Node.js 8.10.

I am glad you found a solution @nathan.f77! :fist_right::fist_left: