Assume that the comment and extra nodes can be discarded, but that
we want to include the output of the Lambda function, and preserve the information
in the
data node.

In the updated state machine, the Task state is altered to process the input to
the task.

"InputPath": "$.lambda",

This line in the state machine definition limits the task input to only the
lambda node from the state input. The Lambda function receives only the JSON
object {"who": "AWS Step Functions"} as input.

"ResultPath": "$.data.lambdaresult",

This ResultPath tells the state machine to insert the result of the Lambda
function into a node named lambdaresult, as a child of the data node
in the original state machine input. Without further processing with OutputPath,
the input of the state now includes the result of the Lambda function with the original
input.