MacOS 10.14.6 Mojave.
Node v10.15.3
LocalStack - docker image 0.10.4

When invoking a Lambda from Node.js code.


    const lambda = new Aws.Lambda(creds);
    
    const payload = {};
    
    const clientContext = {
        invokedFunctionArn: this._workerArn
    };
    
    const params = {
        FunctionName: this._workerArn,
        InvocationType: "RequestResponse", // "DryRun",
        LogType: 'Tail', // "None", "Tail"
        ClientContext: JSON.stringify(clientContext),
        Payload: JSON.stringify(payload)
    };
    
    console.log(`DEBUG: Executing lambda ${JSON.stringify(params)}`);
    
    lambda.invoke(params, function (err, data) {
        console.log(`DEBUG: Printing lambda return arguments`);
        console.log(JSON.stringify(arguments));
        console.log(data.LogResult);
    });```
DEBUG: Printing lambda return arguments
{"0":null,"1":{"StatusCode":200,"Payload":"null"}}
undefined
```

Expecting to see the Lambda execution log in `data.LogResult`, but no such object returned,
yet Localstack Cloudwatch logs recorded the execution logs correctly.


```
EVENTS	75	1570381308926.664	+51733/05/27/[$LATEST]629146bb	START RequestId: dbd86068-78c8-1a62-29ca-9c0a4a8580c3 Version: $LATEST	1570381306039
EVENTS	76	1570381308926.664	+51733/05/27/[$LATEST]629146bb	2019-10-06T17:01:47.924Z	dbd86068-78c8-1a62-29ca-9c0a4a8580c3	INFO	DEBUG: LOCALSTACK_HOSTNAME=172.17.0.1	1570381306520
...
EVENTS	79	1570381308926.664	+51733/05/27/[$LATEST]629146bb	END RequestId: dbd86068-78c8-1a62-29ca-9c0a4a8580c3	1570381307961
EVENTS	80	1570381308926.664	+51733/05/27/[$LATEST]629146bb	REPORT RequestId: dbd86068-78c8-1a62-29ca-9c0a4a8580c3	Duration: 16.05 ms	Billed Duration: 100 ms	Memory Size: 1536 MB	Max Memory Used: 57 MB		1570381308442
```

What I'm missing? Why it doesn't return logs on invoke?

Thanks



┆Issue is synchronized with this [Jira Bug](https://localstack.atlassian.net/browse/LOC-125) by [Unito](https://www.unito.io/learn-more)

TEST_LAMBDA_NAME_CUSTOM_RUNTIME = 'test_lambda_custom_runtime'
TEST_LAMBDA_NAME_JAVA = 'test_lambda_java'
TEST_LAMBDA_NAME_JAVA_STREAM = 'test_lambda_java_stream'
TEST_LAMBDA_NAME_JAVA_SERIALIZABLE = 'test_lambda_java_serializable'
TEST_LAMBDA_NAME_JAVA_KINESIS = 'test_lambda_java_kinesis'
TEST_LAMBDA_NAME_ENV = 'test_lambda_env'
TEST_LAMBDA_ECHO_FILE = os.path.join(THIS_FOLDER, 'lambdas', 'lambda_echo.py')
TEST_LAMBDA_SEND_MESSAGE_FILE = os.path.join(THIS_FOLDER, 'lambdas', 'lambda_send_message.py')
TEST_LAMBDA_PUT_ITEM_FILE = os.path.join(THIS_FOLDER, 'lambdas', 'lambda_put_item.py')
TEST_LAMBDA_START_EXECUTION_FILE = os.path.join(THIS_FOLDER, 'lambdas', 'lambda_start_execution.py')
TEST_LAMBDA_FUNCTION_PREFIX = 'lambda-function'
TEST_SNS_TOPIC_NAME = 'sns-topic-1'
MAVEN_BASE_URL = 'https://repo.maven.apache.org/maven2'
TEST_LAMBDA_JAR_URL = '{url}/cloud/localstack/{name}/{version}/{name}-{version}-tests.jar'.format(
    version=LOCALSTACK_MAVEN_VERSION, url=MAVEN_BASE_URL, name='localstack-utils')
TEST_LAMBDA_LIBS = [
    'localstack', 'localstack_client', 'requests', 'psutil', 'urllib3', 'chardet', 'certifi', 'idna', 'pip', 'dns'
]
def _run_forward_to_fallback_url(url, num_requests=3):
    lambda_client = aws_stack.connect_to_service('lambda')
    config.LAMBDA_FALLBACK_URL = url
    try:
        for i in range(num_requests):
            lambda_client.invoke(FunctionName='non-existing-lambda-%s' % i,
                                 Payload=b'{}', InvocationType='RequestResponse')
    finally:
        config.LAMBDA_FALLBACK_URL = ''
class LambdaTestBase(unittest.TestCase):
    def test_create_lambda_function(self):
        func_name = 'lambda_func-{}'.format(short_uid())