List Objects in a Bucket

Prev Next

The list_objects_v2() method returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket.

The list_objects() method is a prior version of the same method, supported for backward compatibility.

Example

This example retrieves the list of objects in the bucket "mybucket".

response = s3_client.list_objects_v2(
    Bucket='mybucket',
)