I'm trying to clean out 50,000 (or more) stale assets from a bucket, but the process won't complete because it uses the ListObjectsV2Command which limits the number of returned keys, and the code does not attempt to use pagination to get the full list.
Something like this which uses paginateListObjectsV2 should be used in order to obtain the full list of keys in the bucket.
I'm trying to clean out 50,000 (or more) stale assets from a bucket, but the process won't complete because it uses the ListObjectsV2Command which limits the number of returned keys, and the code does not attempt to use pagination to get the full list.
Something like this which uses
paginateListObjectsV2should be used in order to obtain the full list of keys in the bucket.