### Is there an existing issue for this?

- [X] I have searched the existing issues and read the documentation

### Question

After configuring it  withEnv("DYNAMODB_WRITE_ERROR_PROBABILITY", "1.0") — it is expected to throw dynamo throuput exception , but throwing 500 error - `(Service: DynamoDb, Status Code: 500, Request ID: null, Extended Request ID: null)","operationType":"PutItem","kinesisRecordMetaData":{"recordInsertionDate":"01-01-2021"}}, Response - PutObjectResponse(ETag="5435b0664a1337227d380fbd83ebcc89")

### Anything else?

_No response_
global CACHE_S3_HOSTNAME_DNS_STATUS
    if CACHE_S3_HOSTNAME_DNS_STATUS is None:
        try:
            assert socket.gethostbyname(S3_VIRTUAL_HOSTNAME)
            CACHE_S3_HOSTNAME_DNS_STATUS = True
        except socket.error:
            CACHE_S3_HOSTNAME_DNS_STATUS = False
    if CACHE_S3_HOSTNAME_DNS_STATUS:
        return S3_VIRTUAL_HOSTNAME
    return LOCALHOST
def generate_presigned_url(*args, **kwargs):
    endpoint_url = kwargs.pop("endpoint_url", None)
    s3_client = connect_to_service(
        "s3",
        endpoint_url=endpoint_url,
        cache=False,
        
        aws_access_key_id=TEST_AWS_ACCESS_KEY_ID,
        aws_secret_access_key=TEST_AWS_SECRET_ACCESS_KEY,
    )
    return s3_client.generate_presigned_url(*args, **kwargs)
def check_valid_region(headers):