'AWS S3 consistency for inter-region locking

I have a use case around guaranteeing idempotent behavior for client requests based on a client supplied request_id, across multiple AWS regions.

Therefore on request replay in case of timeouts or such, it is possible (though unlikely due to geo-affinity based routing) that another region receives the request. The region that receives the replay needs to make a determination whether the request was received & is being processed by another AWS region.

From S3 documentation, I understand that S3 promises highly consistent read-after-write consistency i.e.

If I GET & don't find an object related to request_id, write/PUT an S3 object on Region 1 & then start working on the request.

If the client retried and the request reached Region 2, would attempt to GET object related to request_id be guaranteed to see the PUT that was done in Region 1, even if there was a region outage in Region 1 precisely after PUT was successful ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source