Delete Objects

Delete objects from an S3 bucket.

Source codePermissions

Usage

Input

Parameter Description Type Required Default value
bucket Name of the S3 bucket to delete objects from string Yes None
objects Objects to delete list(string) Yes None
prefix Prefix to filter objects by string No None
region Region for operation string No Session default
debug Increase log verbosity bool No False
silent Decrease log verbosity bool No False
output Output format
table
string No None
session Established session object No None

Output

Returns a list of objects that failed the deletion:

['object1', 'object2']

Examples

Delete examples/object1 and examples/object2 from example-bucket:

aaws s3 delete_objects --bucket example-bucket --objects examples/object1 examples/object2

Delete object1 and object2 using prefix examples from example-bucket:

aaws s3 delete_objects --bucket example-bucket --prefix examples --objects object1 object2