API Gateway September 2016 update introduced a ton of new features, mostly dependent on the new AWS_PROXY integration type. To get all those benefits, we had to make a backwards-incompatible internal change to Claudia. We’re also using this opportunity to do some house-keeping and drop support for Node 0.10 which is not going to be supported in Lambda any more soon. If you still need to use 0.10 APIs, then use 1.x version of Claudia.
The 2.0 branch is fully backwards compatible with 1.x, so you do not need to make any changes to your code. There are several deprecated features, though, and we will likely be removing them in the next major version (not at least for the next six months). Here is what to use instead:
.unsupportedEvent
in Claudia API Builder was a hack to allow Web APIs to process events coming from other sources. A much better way of handling that is to intercept the request, and just returnfalse
after processing it.- With the old API Gateway integration, developers had to enumerate upfront any headers they might want to set from the code. Enumerated headers are no longer required, so you’ll get a warning if your code still uses that. It’s safe to just drop the configuration. So instead of something like this:
Just use
- for unit testing web APIs locally, do not call the
.router
method any more. Instead, switch to.proxyRouter
and send the AWS Proxy request object instead of the Claudia API Builder request object. The Running Automated Tests Locally tutorial contains the sample test code with the new format.