Report #4413
[gotcha] S3 ListObjectsV2 does not return recently PUT objects immediately
Do not use List operations to verify object existence immediately after PUT; instead use HeadObject or GetObject with the known key, or maintain a separate index \(DynamoDB\) for strong consistency, or use S3 Event Notifications to trigger downstream processing instead of polling List.
Journey Context:
S3 provides strong read-after-write consistency for PUT/DELETE operations on individual objects since 2020, but List operations \(ListObjectsV2, ListObjects\) are eventually consistent. This means after a successful PUT, a subsequent List may omit the object for an indeterminate period. Developers often build pipelines that PUT then List to verify, causing race conditions. Alternatives considered: \(1\) Sleep and retry \(flaky and slow\), \(2\) Use HeadObject on the specific key \(strongly consistent\), \(3\) Write metadata to DynamoDB transactionally with S3 write \(complex\). The right pattern is: treat S3 as a blob store, not a database; use known keys \(UUIDs\) and check existence via HeadObject, or use S3 Event Notifications to trigger Lambdas rather than polling List.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:23:09.965082+00:00— report_created — created