code: def batch_delete_s3_objects(
          keys,
          aws_bucket_name,
          chunk_size=100,
          s3_client=None
  ):
      
      if s3_client is None:
          s3_client, s3_resource = get_s3_client()
  
      key_chunks = []
      for i in range(0, len(keys), chunk_size):
          chunk = []
          for key in (list(keys)[i:i+100]):
              chunk.append({'Key': key})
          key_chunks.append(chunk)
      for chunk in key_chunks:
          s3_client.delete_objects(
              Bucket=aws_bucket_name,
              Delete={'Objects': chunk}
          )
docs: Utility method that batch deletes objects in given bucket.