<!-- 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

On BatchWriteItem if items are throttled, we are expected to receive a list of `UnprocessedItems` in the response instead of HTTP 500

## Expected behavior

Receive HTTP 200 but with Unprocessed Items in the response: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html#DDB-BatchWriteItem-response-UnprocessedItems

## Actual behavior

Receive HTTP 500 ProvisionedThroughPutException. "All or nothing"

# Steps to reproduce

Start LocalStack with DynamoDb Service and "DYNAMODB_ERROR_PROBABILITY=1.0"

## Command used to start LocalStack

```
new LocalStackContainer(DockerImageName.parse("localstack/localstack:0.12.9"))
      .withEnv("DYNAMODB_ERROR_PROBABILITY", "1.0")
      .withServices(DYNAMODB)
```

## Client code (AWS SDK code snippet, or sequence of "awslocal" commands)

You can just Randomly generate a big list of objects (exceeding 1kb per batch) and check this behaviour


for record in records:
            if record['dynamodb'].get('StreamViewType'):
                
                if record['dynamodb']['StreamViewType'] == 'KEYS_ONLY':
                    record['dynamodb'].pop('OldImage', None)
                    record['dynamodb'].pop('NewImage', None)
                
                elif record['dynamodb']['StreamViewType'] == 'NEW_IMAGE':
                    record['dynamodb'].pop('OldImage', None)
                
                elif record['dynamodb']['StreamViewType'] == 'OLD_IMAGE':
                    record['dynamodb'].pop('NewImage', None)
        return records
    def delete_all_event_source_mappings(self, table_arn):
        if table_arn:
            
            if not is_api_enabled('lambda'):
                return
            lambda_client = aws_stack.connect_to_service('lambda')
            result = lambda_client.list_event_source_mappings(EventSourceArn=table_arn)
            for event in result['EventSourceMappings']:
                event_source_mapping_id = event['UUID']
                lambda_client.delete_event_source_mapping(UUID=event_source_mapping_id)
    @staticmethod
    def _thread_local(name, default=None):