Welcome to the new DOCS.vastdata.com. We've added new menus and a version selector, plus new persona and resource pages to help customers get started. Looking for a previous article? Use the docs search.

Deleting Multiple Objects

Prev Next

The delete_objects() method deletes multiple objects in a bucket.

Example

response = s3_client.delete_objects(
    Bucket='mybucket',
    Delete={
        'Objects': [
            {'Key': 'file1'},
            {'Key': 'file2'},
            {'Key': 'file3'},
        ],
    },
)