<!-- Love localstack? Please consider supporting our collective:
👉  https://opencollective.com/localstack/donate -->

# Type of request: This is a ...

[x] bug report
[ ] feature request

# Detailed description
Using the serverless-local plugin, I cannot get the stack to deploy to the localstack environment and it always produces an error on Update Stack. I am using the latest image (as of 7 hours ago at the time of this issue report. I am also using the latest of serverless-localstack and serverless framework.

`custom:
  localstack:
    stages:
      - local
    autostart: true
    host: http://localhost
    debug: true`

```
❯ sls deploy -s local
Serverless: Using serverless-localstack
Serverless: Reconfiguring service apigateway to use http://localhost:4567
Serverless: Reconfiguring service cloudformation to use http://localhost:4581
Serverless: Reconfiguring service cloudwatch to use http://localhost:4582
Serverless: Reconfiguring service lambda to use http://localhost:4574
Serverless: Reconfiguring service dynamodb to use http://localhost:4569
Serverless: Reconfiguring service kinesis to use http://localhost:4568
Serverless: Reconfiguring service route53 to use http://localhost:4580
Serverless: Reconfiguring service firehose to use http://localhost:4573
Serverless: Reconfiguring service stepfunctions to use http://localhost:4585
Serverless: Reconfiguring service es to use http://localhost:4578
Serverless: Reconfiguring service s3 to use http://localhost:4572
Serverless: Reconfiguring service ses to use http://localhost:4579
Serverless: Reconfiguring service sns to use http://localhost:4575
Serverless: Reconfiguring service sqs to use http://localhost:4576
Serverless: Reconfiguring service sts to use http://localhost:4592
Serverless: Reconfiguring service iam to use http://localhost:4593
Serverless: Reconfiguring service ssm to use http://localhost:4583
Serverless: Reconfiguring service rds to use http://localhost:4594
Serverless: Reconfiguring service ec2 to use http://localhost:4597
Serverless: Reconfiguring service elasticache to use http://localhost:4598
Serverless: Reconfiguring service kms to use http://localhost:4599
Serverless: Reconfiguring service secretsmanager to use http://localhost:4584
Serverless: Reconfiguring service logs to use http://localhost:4586
Serverless: Reconfiguring service cloudwatchlogs to use http://localhost:4586
Serverless: Reconfiguring service iot to use http://localhost:4589
Serverless: Reconfiguring service cognito-idp to use http://localhost:4590
Serverless: Reconfiguring service cognito-identity to use http://localhost:4591
Serverless: Reconfiguring service ecs to use http://localhost:4601
Serverless: Reconfiguring service eks to use http://localhost:4602
Serverless: Reconfiguring service xray to use http://localhost:4603
Serverless: Reconfiguring service appsync to use http://localhost:4605
Serverless: Reconfiguring service cloudfront to use http://localhost:4606
Serverless: Reconfiguring service athena to use http://localhost:4607
Serverless: config.options_stage: local
Serverless: serverless.service.custom.stage: undefined
Serverless: serverless.service.provider.stage: local
Serverless: config.stage: local
Serverless: Packaging service...
 
  Serverless Error ---------------------------------------
 
  Bad Request
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              12.16.0
     Framework Version:         1.67.3
     Plugin Version:            3.6.6
     SDK Version:               2.3.0
     Components Version:        2.29.1
```

Inside the localstack container i see the following logs:

```
2020-04-11T18:33:46:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response for CloudFormation action "DescribeStacks" (400) POST /: b'Function not found: arn:aws:lambda:us-east-1:000000000000:function:phoenix-local-app-service-domain-projects'
2020-04-11T18:33:46:DEBUG:localstack.services.cloudformation.cloudformation_starter: Currently processing stack resource phoenix-local/ServerlessDeploymentBucketPolicy: None
2020-04-11T18:33:46:WARNING:moto: No Moto CloudFormation support for AWS::S3::BucketPolicy
2020-04-11T18:33:46:DEBUG:localstack.services.cloudformation.cloudformation_starter: Currently processing stack resource phoenix-local/AppDashserviceDashdomainDashprojectsLogGroup: False
2020-04-11T18:33:46:DEBUG:localstack.services.cloudformation.cloudformation_starter: Deploying CloudFormation resource (update=False, exists=False, updateable=False): {'Type': 'AWS::Logs::LogGroup', 'Properties': {'LogGroupName': '/aws/lambda/phoenix-local-app-service-domain-projects'}}
2020-04-11T18:33:46:DEBUG:localstack.utils.cloudformation.template_deployer: Running action "create" for resource type "Logs::LogGroup" id "AppDashserviceDashdomainDashprojectsLogGroup"
2020-04-11T18:33:46:DEBUG:localstack.utils.cloudformation.template_deployer: Request for resource type "Logs::LogGroup" in region us-east-1: create_log_group {'logGroupName': '/aws/lambda/phoenix-local-app-service-domain-projects'}
2020-04-11T18:33:46:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.CloudWatchLogs object at 0x7fae34911160>> with params: {'logGroupName': '/aws/lambda/phoenix-local-app-service-domain-projects'} for resource: {'Type': 'AWS::Logs::LogGroup', 'Properties': {'LogGroupName': '/aws/lambda/phoenix-local-app-service-domain-projects'}}
2020-04-11T18:33:46:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "AppDashserviceDashdomainDashprojectsLogGroup": An error occurred (ResourceAlreadyExistsException) when calling the CreateLogGroup operation: The specified log group already exists Traceback (most recent call last):
  File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 195, in parse_and_create_resource
    return _parse_and_create_resource(
  File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 304, in _parse_and_create_resource
    result = deploy_func(logical_id, resource_map_new, stack_name=stack_name)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1017, in deploy_resource
    return execute_resource_action(resource_id, resources, stack_name, ACTION_CREATE)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1043, in execute_resource_action
    result = configure_resource_via_sdk(resource_id, resources, resource_type, func, stack_name)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1120, in configure_resource_via_sdk
    raise e
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1117, in configure_resource_via_sdk
    result = function(**params)
  File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 316, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 626, 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

2020-04-11T18:33:46:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response for CloudFormation action "DescribeStackResource" (400) POST /: b'The specified log group already exists'
2020-04-11T18:33:46:WARNING:localstack.utils.cloudformation.template_deployer: Unable to get details for resource "ApiGatewayResourceProxyVar" in CloudFormation stack "phoenix-local": Unable to parse response (syntax error: line 1, column 0), invalid XML received:
b'The specified log group already exists'
2020-04-11T18:33:46:INFO:localstack.services.cloudformation.cloudformation_starter: Resource ApiGatewayDeployment1586630024025 cannot be deployed, found unsatisfied dependencies. {'Type': 'AWS::ApiGateway::Deployment', 'Properties': {'RestApiId': 'jac6pumuy6', 'StageName': 'local'}, 'DependsOn': ['ApiGatewayMethodProxyVarAny']}
2020-04-11T18:33:46:WARNING:localstack.services.cloudformation.cloudformation_starter: Unresolvable dependencies, there may be undeployed stack resources: {'AppDashserviceDashdomainDashprojectsLambdaFunction': ['AppDashserviceDashdomainDashprojectsLambdaFunction', {'Type': 'AWS::Lambda::Function', 'Properties': {'Code': {'S3Bucket': 'phoenix-local-serverlessdeploymentbucket-defkbstuynwj', 'S3Key': 'serverless/phoenix/local/1586629890845-2020-04-11T18:31:30.845Z/App.Service.Domain.Projects.zip'}, 'FunctionName': 'phoenix-local-app-service-domain-projects', 'Handler': 'App.Service.Domain.Projects::App.Service.Domain.Projects.LambdaEntryPoint::FunctionHandlerAsync', 'MemorySize': 512, 'Role': 'arn:aws:iam::123456789012:role/phoenix-local-us-east-1-lambdaRole', 'Runtime': 'dotnetcore3.1', 'Timeout': 6, 'Environment': {'Variables': {'DOTNET_URLS': 'http://*:80'}}, 'VpcConfig': {'SecurityGroupIds': ['sg-00a50ac2317aa947c'], 'SubnetIds': ['subnet-0ce40cbf66cd8bc36', 'subnet-0861e62180b7f2514']}}, 'DependsOn': ['AppDashserviceDashdomainDashprojectsLogGroup', 'IamRoleLambdaExecution']}, <moto.cloudformation.parsing.ResourceMap object at 0x7fae34bc3820>, 'us-east-1'], 'SnsDashtestLambdaFunction': ['SnsDashtestLambdaFunction', {'Type': 'AWS::Lambda::Function', 'Properties': {'Code': {'S3Bucket': 'phoenix-local-serverlessdeploymentbucket-defkbstuynwj', 'S3Key': 'serverless/phoenix/local/1586629890845-2020-04-11T18:31:30.845Z/SNSTest.zip'}, 'FunctionName': 'phoenix-local-sns-test', 'Handler': 'SNSTest::SNSTest.HandlerWrapper::HandleAsync', 'MemorySize': 128, 'Role': 'arn:aws:iam::123456789012:role/phoenix-local-us-east-1-lambdaRole', 'Runtime': 'dotnetcore3.1', 'Timeout': 6, 'VpcConfig': {'SecurityGroupIds': ['sg-00a50ac2317aa947c'], 'SubnetIds': ['subnet-0ce40cbf66cd8bc36', 'subnet-0861e62180b7f2514']}}, 'DependsOn': ['SnsDashtestLogGroup', 'IamRoleLambdaExecution']}, <moto.cloudformation.parsing.ResourceMap object at 0x7fae34bc3820>, 'us-east-1'], 'ApiGatewayDeployment1586629849594': ['ApiGatewayDeployment1586629849594', {'Type': 'AWS::ApiGateway::Deployment', 'Properties': {'RestApiId': 'jac6pumuy6', 'StageName': 'local'}, 'DependsOn': ['ApiGatewayMethodProxyVarAny']}, <moto.cloudformation.parsing.ResourceMap object at 0x7fae34bc3820>, 'us-east-1'], 'ApiGatewayDeployment1586630024025': ['ApiGatewayDeployment1586630024025', {'Type': 'AWS::ApiGateway::Deployment', 'Properties': {'RestApiId': 'jac6pumuy6', 'StageName': 'local'}, 'DependsOn': ['ApiGatewayMethodProxyVarAny']}, <moto.cloudformation.parsing.ResourceMap object at 0x7fae34bc3820>, 'us-east-1']}
2020-04-11T18:33:46:WARNING:bootstrap.py: Thread run method <function apply_patches.<locals>.run_dependencies_deployment_loop.<locals>.run_loop at 0x7fae345e7ee0>(None) failed: Traceback (most recent call last):
  File "/opt/code/localstack/localstack/utils/bootstrap.py", line 483, in run
    self.func(self.params)
  File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 743, in run_loop
    raise Exception('Unable to resolve all CloudFormation resources after traversing ' +
Exception: Unable to resolve all CloudFormation resources after traversing dependency tree (maximum depth 40 reached): dict_keys(['AppDashserviceDashdomainDashprojectsLambdaFunction', 'SnsDashtestLambdaFunction', 'ApiGatewayDeployment1586629849594', 'ApiGatewayDeployment1586630024025'])
```

## Expected behavior
I expect the stack to be created and updated like it does on AWS directly
...

## Actual behavior
It creates the stack, but fails to update. Sometimes i start getting 502's from the edge endpoint as well when I use AWS CLI to describe the stack.

```
❯ aws cloudformation describe-stacks --endpoint-url=http://localhost:4566

Unable to parse response (syntax error: line 1, column 0), invalid XML received:
b'Function not found: arn:aws:lambda:us-east-1:000000000000:function:phoenix-local-app-service-domain-projects'
```

# Steps to reproduce

## Command used to start LocalStack
serverless-localstack plugin autostart or `ENTRYPOINT=-d localstack start --docker`, i've tried both

Let me know if you need any additional detail!
"""
        Return the Java classpath, using the parent folder of the
        given archive as the base folder.
        The result contains any *.jar files in the base folder, as
        well as any JAR files in the "lib/*" subfolder living
        alongside the supplied java archive (.jar or .zip).
        :param archive: an absolute path to a .jar or .zip Java archive
        :return: the Java classpath, relative to the base dir of "archive"
        """
        entries = ['.']
        base_dir = os.path.dirname(archive)
        for pattern in ['%s/*.jar', '%s/lib/*.jar', '%s/*.zip']:
            for entry in glob.glob(pattern % base_dir):
                if os.path.realpath(archive) != os.path.realpath(entry):
                    entries.append(os.path.relpath(entry, base_dir))
        
        
        entries.append(os.path.relpath(archive, base_dir))
        result = ':'.join(entries)
        return result
EXECUTOR_LOCAL = LambdaExecutorLocal()
EXECUTOR_CONTAINERS_SEPARATE = LambdaExecutorSeparateContainers()
EXECUTOR_CONTAINERS_REUSE = LambdaExecutorReuseContainers()
DEFAULT_EXECUTOR = EXECUTOR_CONTAINERS_SEPARATE
AVAILABLE_EXECUTORS = {
    'local': EXECUTOR_LOCAL,
    'docker': EXECUTOR_CONTAINERS_SEPARATE,
    'docker-reuse': EXECUTOR_CONTAINERS_REUSE
}