A records-purge job lists thousands of S3 inventory objects but stops halfway because the code ignores continuation tokens. What should the developer fix?
Select an answer to reveal the explanation.
Short Explanation
Big S3 listings come like a binder with page tabs—miss a tab and you only purged half the shelf. Walk every continuation token with the SDK's paginator (and keep retries on). Glacier storage class, a longer timeout alone, or HeadBucket won't finish a multi-page list.
Full Explanation
S3 list APIs return truncated pages with continuation tokens; applications must paginate until results are exhausted. Ignoring tokens silently skips objects. Storage class changes, timeout-only tweaks, and HeadBucket do not replace proper ListObjects/ListObjectsV2 pagination and retry handling for large inventories.