Are S3 methods synchronous?
I can't seem to find an answer to this online site.
I am using AWS S3 Ruby gem to call move_to
for my objects in S3. Immediately after moving, I read the S3 object in the new location. Once in a blue moon, this read will throw an error No Such Key
- only once in a while, perhaps several times in the thousands of runs of this code.
Can anyone confirm what move_to
is a synchronous call? If it's not synchronous, how can I make sure the object exists in the new location before reading it?
source to share
AWS S3 operations are ultimately consistent. Data is stored redundantly in multiple locations and each location may take time to update. Therefore, if your reading hits the first place that has been updated, you immediately see the effect of the operation. If it hits a different node, the updates may not have propagated to it yet.
source to share