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?
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:
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
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.