Skip to content

Instantly share code, notes, and snippets.

@ivanlonel
ivanlonel / aws_s3_rename_files.py
Last active April 1, 2021 00:32
Renaming files in AWS S3
import boto3
import json
import logging
import argparse
import itertools
# Bucket.delete_objects allows a maximum of 1000 objects to be deleted in a single request
def break_in_chunks(iterable, max_size):
if max_size == 0: