Open source tool manages AWS Lambda apps

The open source tool deploys, runs, and manages AWS Lambda apps from the command line, even using apps written in languages not supported directly by Lambda

Open source tool manages AWS Lambda apps
Credit: Thinkstock

A new open source project from Express and Node.js-canvas creator TJ Holowaychuk lets developers create, deploy, and manage AWS Lambda functions from a command-line tool.

Apex, written in Google's Go language, also makes it possible to run applications in languages not directly supported by AWS Lambda, such as Golang itself.

Apex deploys AWS Lambda functions via projects, aka collections of function definitions described with JSON. It bundles all the needed dependencies and uploads them to AWS, and it automatically cleans up older or outdated versions of functions. In a nod to building versioned APIs, Apex allows users to manually specify which versions of a given function to retain.

An Apex project also supports hooks to allow arbitrary code to run during a build, deploy, or cleanup action. For instance, if you're deploying a Go program wrapped in an Apex project, you can have the Go program rebuilt right before the deployment. In addition, Apex can set environment variables for a Lambda function -- Amazon doesn't support that yet.

To run applications not directly supported by AWS Lambda, Apex uses a Node.js shim mechanism, which is a tiny app that runs in a child process. Nearly any app that uses stdin/stdout should work as-is through the shim, although they need to log errors to stderr, and there may be a minor delay the first time the function is invoked.

Another open source project, Serverless (formerly Jaws), purports to cover many of the same tasks as Apex, but Apex claims Serverless cannot perform shimming "out of the box." Zappa, another similar project, is specifically aimed at hoisting Python applications onto AWS Lambda, while Apex is intended to be more general in use.

From CIO: 8 Free Online Courses to Grow Your Tech Skills