aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

Updated s3_cleanup to use waiters, paginators, and batch delete_objects

Open jonathan343 opened this issue 3 years ago • 0 comments

Updated s3_cleanup to use waiters, paginators, and batch delete_objects

Description of changes: Modernized the s3_cleanup function using waiters to solve the NoSuchBucket errors. I also implemented the use of paginators to iterate over bucket keys and batch delete_objects to empty them out.

Performance Changes Before these changes, the tests/integration/customizations/s3/__init__.py file on average seemed to run in 20-25 seconds as compared to 23-30 seconds after the changes. There is an obvious decrease in performance, however, the changes should save time by preventing future test failures.

jonathan343 avatar Sep 08 '22 17:09 jonathan343