I am using the AWS SDK for Java to invoke some AWS Lambda functions that have been uploaded previously. The invokeAsync method returns an invokeAsyncResult object, which seems to include only a very limited set of properties and methods. In particular, the only relevant information contained in the object is the HTTP status code (e.g., 202 for success). There does not seem to be any properties of methods for retrieving the error code or the message that are supplied to the Lambda Node.js context.done() method.
As such, there is no way to directly get any "return values" from the Lambda function invocation. I have to let the Lambda handler put an object to S3 to store a JSON representation of the return value and then use the Java SDK code to get the content of the object at the consumer side.
Does anybody know of a way to directly get some meaningful "return values" from the Lambda function?