Legacy Node.js Shim
This release is tagged at a legacy Node.js shim version of aegis. Before AWS Lambda officially supported Go, the use of stdout was required to pipe text back to the Node.js wrapper function which then worked with Lambda to send JSON back through API Gateway.
Now that Lambda supports Go, aegis will no longer need to rely on this shim. This will make things a bit faster and more stable. However, it also means that there are some breaking changes.
AWS Lambda's support of Go is extremely similar to aegis. AWS Lambda now has context, request, and response structs which will replace aegis'. They are almost identical in many cases, but the names are different of course and there's no sense in wrapping or mapping them. Aegis only support Lambda so it's best to simply use those structs.
This means that every app built with aegis will need to adjust its route handlers.
For example, context is no longer aegis' lambda.Context
but is now events.APIGatewayProxyRequestContext
from AWS Lambda package.
lambda.ProxyResponse
will now be events.APIGatewayProxyResponse
and its fields are almost identical. The StatusCode
field there is a proper int whereas aegis had a string because of the need to pipe back out to the Node.js shim via stdout. So things become a bit nicer here now that AWS supports Go.
So the changes to route handler functions should be minor, but they are necessary. This release/tag will provide a version of aegis to use while you make the transition.
An OS X binary is attached to this release to use. If you are on another architecture, you'll need to check out this tag and build your own.