The querystring module in use by aws2js does not parse nested objects within json strings. Suggestion is to move towards the use of the 'qs' module instead, which can handle this case.
This became a problem for me when attempting to use aws2js with Amazon Simple Workflow (SWF), as a number of the API calls require a nested object for the queue name.
See here http://docs.amazonwebservices.com/amazonswf/latest/apireference/API_PollForActivityTask.html
As far as I can see, the SWF API uses a JSON request body for the POST call. It can be patched the same way DynamoDB was patched on top of the query.request() call via an implemented exception. It feels more natural to pass an object that's going to be turned into JSON by JSON.stringify(). qs would be an useless addition since it does object to string / string to object conversion instead of JSON to string / string to JSON conversion.
Hopefully, signHeaders is reusable for this API. The documentation looks nearly the same. If my hunch is right, then the Date header, if specified, must be part of the StringToSign. They "simply forgot" to mention that into the DynamoDB documentation. Hopefully the algo doesn't have any other gotcha besides this one.
Sorry for not closing this sooner - just doing some spring cleaning! Yes, this was spot on and I was able to patch on top of query.request().