Ask questionsRunLambdaTask with outputPath not working

<!-- description of the bug: -->

outputPath when used with RunLambdaTask is not working as documented. In the step functions overview under Lambda example

"The following snippet invokes a Lambda and sets the task output to only include the Lambda function response."

new sfn.Task(this, 'Invoke and set function response as task output', {
  task: new tasks.RunLambdaTask(myLambda, {
    payload: sfn.TaskInput.fromDataAt('$'),
  outputPath: '$.Payload',

Reproduction Steps

Starting from a working tasks.InvokeFunction:

minimal amount of code that causes the bug (if possible) or a reference:

         const getObject = new sfn.Task(this, "Get Object", {
-            task: new tasks.RunLambdaTask(getObjectLambda, {}),
-            outputPath: "$.Payload",
+            task: new tasks.InvokeFunction(getObjectLambda, {}),
             resultPath: "$.GetObjectResult",

Also tried outputPath: "$.output.Payload" with same result.

Error Log

<!-- what is the error message you are seeing? -->

TaskSucceeded with:

  "resourceType": "lambda",
  "resource": "invoke",
  "output": {
    "ExecutedVersion": "$LATEST",
    "Payload": {
      "Done": true,
      "Next": null,
      "BitsFetched": 0
    "SdkHttpMetadata": {
      "HttpHeaders": {
        "Connection": "keep-alive",
        "Content-Length": "41",
        "Content-Type": "application/json",
        "Date": "Thu, 30 Apr 2020 00:36:36 GMT",
        "X-Amz-Executed-Version": "$LATEST",
        "x-amzn-Remapped-Content-Length": "0",
        "x-amzn-RequestId": "f1e1c5df-4740-4389-8230-2c495c5cd829",
        "X-Amzn-Trace-Id": "root=1-5eaa1d94-16cf39fcb6ea5d8bb11bd635;sampled=0"
      "HttpStatusCode": 200
    "SdkResponseMetadata": {
      "RequestId": "f1e1c5df-4740-4389-8230-2c495c5cd829"
    "StatusCode": 200

followed by `ExecutionFailed` with:

  "error": "States.Runtime",
  "cause": "An error occurred while executing the state 'Get Object' (entered at the event id #2). Invalid path '$.Payload' : No results for path: $['Payload']"


### Environment

  - **CLI Version      :** 1.36.1
  - **Framework Version:** 1.36.1
  - **OS               :** macOS Catalina 10.15.5 Beta (19F62f)
  - **Language         :** Typescript

### Other

<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc -->


This is :bug: Bug Report

Answer questions eikeon

Doh, linked the above merge request accidentally to this one in a commit even though the title had the correct issue #


Related questions

Issues compiling CDK projects ("TS2300: Duplicate identifier 'IteratorResult'")
cli: cdk deploy issue hot 3
Subnet selection returns more than one per AZ hot 2
cli: synth fails if cdk.out does not exist hot 2
Default policy are getting creating even when Managed policy were created in the Role hot 1
Python dependency libraries are set to latest hot 1
using json instead of a string as context in cdk.json hot 1
Attaching Managed Policy to Role failing hot 1
Access denied when adding an event notification to an existing s3 bucket hot 1
Unable to create CfnSpotFleet using Python hot 1
DBClusterParameterGroup not found: default.aurora5.6 hot 1
aws-ecs: Cannot deploy fargate services with ECR images hot 1
ecs_patterns.ApplicationLoadBalancedFargateService should allow specifying healthCheck path - aws-cdk hot 1
CodeCommitSourceAction tries to add a policy to an imported role hot 1
Using getAtt that returns a list within a string that is joined in the generated template throws an error hot 1
Github User Rank List