### 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_
endpoint_netloc = urlparse(endpoint).netloc
        if not re.match(r"^.*(localhost(\.localstack\.cloud)?)(:\d+)?$", endpoint_netloc):
            verify_certs = True
    LOG.debug("Creating ES client with endpoint %s", endpoint)
    if ENV_ACCESS_KEY in os.environ and ENV_SECRET_KEY in os.environ:
        access_key = os.environ.get(ENV_ACCESS_KEY)
        secret_key = os.environ.get(ENV_SECRET_KEY)
        session_token = os.environ.get(ENV_SESSION_TOKEN)
        awsauth = AWS4Auth(access_key, secret_key, region_name, "es", session_token=session_token)
        connection_class = RequestsHttpConnection
        return OpenSearch(
            hosts=[endpoint],
            verify_certs=verify_certs,
            use_ssl=use_ssl,
            connection_class=connection_class,
            http_auth=awsauth,
        )
    return OpenSearch(hosts=[endpoint], verify_certs=verify_certs, use_ssl=use_ssl)
def create_kinesis_stream(stream_name, shards=1, env=None, delete=False):
    env = get_environment(env)
    stream = KinesisStream(id=stream_name, num_shards=shards)
    conn = connect_to_service("kinesis", env=env)
    stream.connect(conn)
    if delete:
        run_safe(lambda: stream.destroy(), print_error=False)
    stream.create()
    
    return stream
def kinesis_get_latest_records(stream_name, shard_id, count=10, env=None):