def _delete_objects()

in aws_codeseeder/services/s3.py [0:0]


def _delete_objects(bucket: str, chunk: List[Dict[str, str]]) -> None:
    client_s3 = boto3_client("s3")
    try:
        client_s3.delete_objects(Bucket=bucket, Delete={"Objects": chunk})
    except client_s3.exceptions.ClientError as ex:
        if "SlowDown" in str(ex):
            time.sleep(random.randint(3, 10))
            client_s3.delete_objects(Bucket=bucket, Delete={"Objects": chunk})