Dan Kennedy
Dan Kennedy

Reputation: 538

"If-Match" or "x-goog-if-generation-match" equivalent for PUT requests with AWS/S3

Is there an equivalent to the "If-Match" (Azure) or "x-goog-if-generation-match" (Google Storage) equivalent for PUT requests sent to Amazon S3 blob storage?

Both these headers do the same thing - they allow you to specify that a PUT request to overwrite an object should only succeed if you are overwriting a specific previous version of the object. Details:

https://learn.microsoft.com/en-us/azure/storage/common/storage-concurrency?toc=/azure/storage/blobs/toc.json#optimistic-concurrency-for-blobs-and-containers

https://cloud.google.com/storage/docs/xml-api/reference-headers#xgoogifgenerationmatch

Thanks!

Upvotes: 6

Views: 1021

Answers (1)

jellycsc
jellycsc

Reputation: 12349

Unfortunately, S3 doesn't support conditional PUT. You need to cooperate with other AWS services, such as DynamoDB, to achieve such behaviour.

Upvotes: 3

Related Questions