aws-cli
aws-cli copied to clipboard
Updated s3_cleanup to use waiters, paginators, and batch delete_objects
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.