Probably related to #1643 , but what appears to happen seems different (at least the error is).

From what I can see, the lambda executes successfully, but then fails to return the result, returning the following instead:
```json
{
    "Type": "Server",
    "message": "Error executing Lambda function arn:aws:lambda:ap-northeast-1:000000000000:function:service-stage-functionName: module 'botocore.errorfactory' has no attribute 'ResourceAlreadyExistsException' Traceback (most recent call last):\n  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 106, in _store_logs\n    logs_client.create_log_group(logGroupName=log_group_name)\n  File \"/opt/code/localstack/.venv/lib/python3.6/site-packages/botocore/client.py\", line 357, in _api_call\n    return self._make_api_call(operation_name, kwargs)\n  File \"/opt/code/localstack/.venv/lib/python3.6/site-packages/botocore/client.py\", line 661, in _make_api_call\n    raise error_class(parsed_response, operation_name)\nbotocore.errorfactory.ResourceAlreadyExistsException: An error occurred (ResourceAlreadyExistsException) when calling the CreateLogGroup operation: The specified log group already exists\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/opt/code/localstack/localstack/services/awslambda/lambda_api.py\", line 339, in run_lambda\n    event, context=context, version=version, asynchronous=asynchronous)\n  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 81, in execute\n    return do_execute()\n  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 70, in do_execute\n    self._store_logs(func_details, log_output, invocation_time)\n  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 107, in _store_logs\n    except botocore.errorfactory.ResourceAlreadyExistsException:\nAttributeError: module 'botocore.errorfactory' has no attribute 'ResourceAlreadyExistsException'\n",
    "__type": "InternalFailure"
}
```

Looking at the localstack end I see the following log:

```
...(lambda execution log, SUCCESS etc)...
> REPORT RequestId: 00e1e000-0e00-000c-0000-8ccf00ab00ba	Duration: 52.74 ms	Billed Duration: 100 ms	Memory Size: 1536 MB	Max Memory Used: 5 MB	
> nohup: failed to run command 'python': No such file or directory
2019-10-25T11:46:25:WARNING:localstack.services.awslambda.lambda_api: Error executing Lambda function arn:aws:lambda:ap-northeast-1:000000000000:function:service-stage-functionName: module 'botocore.errorfactory' has no attribute 'ResourceAlreadyExistsException' Traceback (most recent call last):
  File "/opt/code/localstack/localstack/services/awslambda/lambda_executors.py", line 106, in _store_logs
    logs_client.create_log_group(logGroupName=log_group_name)
  File "/opt/code/localstack/.venv/lib/python3.6/site-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/opt/code/localstack/.venv/lib/python3.6/site-packages/botocore/client.py", line 661, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceAlreadyExistsException: An error occurred (ResourceAlreadyExistsException) when calling the CreateLogGroup operation: The specified log group already exists

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 339, in run_lambda
    event, context=context, version=version, asynchronous=asynchronous)
  File "/opt/code/localstack/localstack/services/awslambda/lambda_executors.py", line 81, in execute
    return do_execute()
  File "/opt/code/localstack/localstack/services/awslambda/lambda_executors.py", line 70, in do_execute
    self._store_logs(func_details, log_output, invocation_time)
  File "/opt/code/localstack/localstack/services/awslambda/lambda_executors.py", line 107, in _store_logs
    except botocore.errorfactory.ResourceAlreadyExistsException:
AttributeError: module 'botocore.errorfactory' has no attribute 'ResourceAlreadyExistsException'
```

Will update if I am able to create an easily reproducible case!
sm_name = resolve_refs_recursively(stack_name, sm_name, resources)
            sfn_client = aws_stack.connect_to_service('stepfunctions')
            state_machines = sfn_client.list_state_machines()['stateMachines']
            sm_arn = [m['stateMachineArn'] for m in state_machines if m['name'] == sm_name]
            if not sm_arn:
                return None
            result = sfn_client.describe_state_machine(stateMachineArn=sm_arn[0])
            return result
        elif resource_type == 'StepFunctions::Activity':
            act_name = resource_props.get('Name') or resource_id
            act_name = resolve_refs_recursively(stack_name, act_name, resources)
            sfn_client = aws_stack.connect_to_service('stepfunctions')
            activities = sfn_client.list_activities()['activities']
            result = [a['activityArn'] for a in activities if a['name'] == act_name]
            if not result:
                return None
            return result[0]
        if is_deployable_resource(resource):
            LOG.warning('Unexpected resource type %s when resolving references of resource %s: %s' %
                        (resource_type, resource_id, resource))
    except Exception as e:
        check_not_found_exception(e, resource_type, resource, resource_status)
    return None
def check_not_found_exception(e, resource_type, resource, resource_status):
    
    markers = ['NoSuchBucket', 'ResourceNotFound', '404']
    if not list(filter(lambda marker, e=e: marker in str(e), markers)):
        LOG.warning('Unexpected error retrieving details for resource %s: %s %s - %s %s' %
            (resource_type, e, traceback.format_exc(), resource, resource_status))
def extract_resource_attribute(resource_type, resource, attribute):