### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

The issue is following by:
I created dynamodb table as a custom resource and provider is lambda function, which is sending response data to CF
The table has been created successfully and another resource is trying to get attribute from this table resource (StreamArn attribute which has been returned from lambda provider function as a response to CF's create event)
But CF can't extract this attribute..
I guess CF doesn't set returned response data and physical id correctly from the response..

### Expected Behavior

It should apply response data and `physical resource id` to the created resource

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    docker-compose up



### Environment

```markdown
- OS: macOS Catalina
- LocalStack: latest
```


### Anything else?

here is the localstack log I am seeing:
```
from resource: {'result': {'Status': 'SUCCESS', 'Reason': 'See the details in CloudWatch Log Stream: 2022/02/08/[$LATEST]a3d474e5b93486e21e3891f665c40839', 'PhysicalResourceId': 'Master-local', 'StackId': 'arn:aws:cloudformation:us-west-2:000000000000:stack/db-local/id-123', 'RequestId': 'af1b8bb6', 'LogicalResourceId': 'MasterTable', 'NoEcho': False, 'Data': {'StreamArn': 'arn:aws:dynamodb:us-west-2:000000000000:table/Master-local/stream/2022-02-08T19:02:13.455'}}} {'Type': 'Custom::DynamoDB', 'LogicalResourceId': 'MasterTable', 'Properties': {'ServiceToken': 'arn:aws:lambda:us-west-2:000000000000:function:db-local-dynamodb', 'TableName': 'Master-local', 'BackupArn': 'null'}, '_state_': {'result': {'Status': 'SUCCESS', 'Reason': 'See the details in CloudWatch Log Stream: 2022/02/08/[$LATEST]a3d474e5b93486e21e3891f665c40839', 'PhysicalResourceId': 'Master-local', 'StackId': 'arn:aws:cloudformation:us-west-2:000000000000:stack/db-local/id-123', 'RequestId': 'af1b8bb6', 'LogicalResourceId': 'MasterTable', 'NoEcho': False, 'Data': {'StreamArn': 'arn:aws:dynamodb:us-west-2:000000000000:table/Master-local/stream/2022-02-08T19:02:13.455'}}}, 'PhysicalResourceId': 'MasterTable'}
localstack  | 2022-02-08T19:02:15.360:ERROR:lambda_api: Exception on /2015-03-31/event-source-mappings/ [POST]
localstack  | Traceback (most recent call last):
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
localstack  |     response = self.full_dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
localstack  |     rv = self.handle_user_exception(e)
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
localstack  |     rv = self.dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
localstack  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 1880, in create_event_source_mapping
localstack  |     mapping = add_event_source(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 457, in add_event_source
localstack  |     mapping = build_mapping_obj(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 437, in build_mapping_obj
localstack  |     source_arn = data["EventSourceArn"]
localstack  | KeyError: 'EventSourceArn'
localstack  | 2022-02-08T19:02:15.958:ERROR:lambda_api: Exception on /2015-03-31/event-source-mappings/ [POST]
localstack  | Traceback (most recent call last):
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
localstack  |     response = self.full_dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
localstack  |     rv = self.handle_user_exception(e)
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
localstack  |     rv = self.dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
localstack  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 1880, in create_event_source_mapping
localstack  |     mapping = add_event_source(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 457, in add_event_source
localstack  |     mapping = build_mapping_obj(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 437, in build_mapping_obj
localstack  |     source_arn = data["EventSourceArn"]
localstack  | KeyError: 'EventSourceArn'
localstack  | 2022-02-08T19:02:17.681:ERROR:lambda_api: Exception on /2015-03-31/event-source-mappings/ [POST]
localstack  | Traceback (most recent call last):
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
localstack  |     response = self.full_dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
localstack  |     rv = self.handle_user_exception(e)
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
localstack  |     rv = self.dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
localstack  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 1880, in create_event_source_mapping
localstack  |     mapping = add_event_source(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 457, in add_event_source
localstack  |     mapping = build_mapping_obj(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 437, in build_mapping_obj
localstack  |     source_arn = data["EventSourceArn"]
localstack  | KeyError: 'EventSourceArn'
localstack  | 2022-02-08T19:02:20.408:ERROR:lambda_api: Exception on /2015-03-31/event-source-mappings/ [POST]
localstack  | Traceback (most recent call last):
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
localstack  |     response = self.full_dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
localstack  |     rv = self.handle_user_exception(e)
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
localstack  |     rv = self.dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
localstack  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 1880, in create_event_source_mapping
localstack  |     mapping = add_event_source(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 457, in add_event_source
localstack  |     mapping = build_mapping_obj(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 437, in build_mapping_obj
localstack  |     source_arn = data["EventSourceArn"]
localstack  | KeyError: 'EventSourceArn'
localstack  | 2022-02-08T19:02:25.094:ERROR:lambda_api: Exception on /2015-03-31/event-source-mappings/ [POST]
localstack  | Traceback (most recent call last):
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
localstack  |     response = self.full_dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
localstack  |     rv = self.handle_user_exception(e)
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
localstack  |     rv = self.dispatch_request()
localstack  |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
localstack  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 1880, in create_event_source_mapping
localstack  |     mapping = add_event_source(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 457, in add_event_source
localstack  |     mapping = build_mapping_obj(data)
localstack  |   File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 437, in build_mapping_obj
localstack  |     source_arn = data["EventSourceArn"]
localstack  | KeyError: 'EventSourceArn'
localstack  | 2022-02-08T19:02:25.098:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.Lambda object at 0x7f0f19aeefd0>> with params: {'BatchSize': 1, 'Enabled': True, 'FunctionName': 'arn:aws:lambda:us-west-2:000000000000:function:db-local-transaction', 'StartingPosition': 'LATEST'} for resource: {'Type': 'AWS::Lambda::EventSourceMapping', 'DependsOn': ['MasterTable'], 'LogicalResourceId': 'MasterTableStream', 'Properties': {'BatchSize': 1, 'Enabled': True, 'EventSourceArn': None, 'FunctionName': 'arn:aws:lambda:us-west-2:000000000000:function:db-local-transaction', 'StartingPosition': 'LATEST'}, '_state_': {}}
```
and I am using serverless framework to deploy the app.
```
resources: # CloudFormation template syntax
  Resources:
    MasterTable:
      Type: Custom::DynamoDB
      Properties:
        ServiceToken:
          Fn::GetAtt:
            - DynamodbLambdaFunction
            - Arn
        TableName: ${ssm:/${self:custom.common.stage}/TABLE_NAME}
        BackupArn: ${ssm:/${self:custom.common.stage}/BACKUP_ARN}
    MasterTableStream:
      Type: AWS::Lambda::EventSourceMapping
      DependsOn: MasterTable
      Properties:
        # The maximum number of DB items to send to Lambda
        BatchSize: 1 # It can be changed based on the need
        Enabled: True
        EventSourceArn:
          Fn::GetAtt: [MasterTable, StreamArn]
        FunctionName:
          Fn::GetAtt: [TransactionLambdaFunction, Arn]
        # Always start at the tail of the Stream
        StartingPosition: LATEST
```
This is resources section of the service being deployed to localstack
As you can see, after the successful deployment of MasterTable, I am trying to deploy MasterTableStream by getting StreamArn  of MasterTable, at this point I am getting this error.
The issue is that CF doesn't update the properties of MasterTable  like physical id or StreamArn from the response got through custom resource provider function.
This is the response custom resource provider function is sending to CF back after creating table:
```
{
  "Status": "SUCCESS",
  "Reason": "See the details in CloudWatch Log Stream: 2022/02/08/[$LATEST]a3d474e5b93486e21e3891f665c40839",
  "PhysicalResourceId": "Master-local",
  "StackId": "arn:aws:cloudformation:us-west-2:000000000000:stack/db-local/id-123",
  "RequestId": "af1b8bb6",
  "LogicalResourceId": "MasterTable",
  "NoEcho": false,
  "Data": {
    "StreamArn": "arn:aws:dynamodb:us-west-2:000000000000:table/Master-local/stream/2022-02-08T19:02:13.455"
  }
}
```
Of course, everything is working on AWS successfully, just this part is not being worked with localstack.
I expect your quick investigation  and help, Thanks


if config.LAMBDA_REMOTE_DOCKER and container_config.required_files:
            for source, target in container_config.required_files:
                LOG.debug('Copying "%s" to "%s:%s".', source, container_config.name, target)
                DOCKER_CLIENT.copy_into_container(container_config.name, source, target)
        return container_id
    def destroy_docker_container(self, func_arn):
        """
        Stops and/or removes a docker container for a specific lambda function ARN.
        :param func_arn: The ARN of the lambda function.
        :return: None
        """
        with self.docker_container_lock:
            status = self.get_docker_container_status(func_arn)
            
            container_name = self.get_container_name(func_arn)
            if status == 1:
                LOG.debug("Stopping container: %s", container_name)
                DOCKER_CLIENT.stop_container(container_name)
                status = self.get_docker_container_status(func_arn)
            if status == -1:
                LOG.debug("Removing container: %s", container_name)
                rm_docker_container(container_name, safe=True)
            
            self.function_invoke_times.pop(func_arn, None)
    def get_all_container_names(self):
        """
        Returns a list of container names for lambda containers.
        :return: A String[] localstack docker container names for each function.
        """
        with self.docker_container_lock: