s3 etag comparison on PutObject

0

Is there a way to use eTags as they meant to be used with S3, where you can retrieve an object, modify it, then when you POST it back, provide the ORIGINAL etag so that your PutObject fails if someone has snuck another update in between your Get and your Put ? I am looking to implement optimistic updating as described here, here, etc. Possible?

profile picture
wz2b
asked a year ago225 views
1 Answer
1

Hi,

In S3, the PUT Object request does not have “if-match” parameter - https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html The client-side logic should handle this situation to do a comparison if the ETag is modified or not. https://docs.aws.amazon.com/AmazonS3/latest/API/API_Object.html#API_Object_Contents

If the Objects created through PUT/POST/COPY operation or through AWS Management console that are encrypted via SSE-S3 or plaintext, the ETags are the MD5 of the object data.

AWS
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions