Can we do write-object-if-not-exist in S3 similar to conditional put in Dynamo DB?

1

I have a use case, where I need to avoid overriding the objects. I do understand that because of the distributed nature of the S3, it might not available. Are there any tricks and hacky way to achieve not to override the object in S3 ?

Dynamo DB is also distributed, but it provides conditional put. Wondering what is the architectural difference between Dynamo DB and S3 ?

已提問 2 年前檢視次數 3985 次
2 個答案
0

S3 Natively does not have any conditions that would satisfy this for the PutObject but what you could consider is making a HeadObject request first and if the object does not exist (404 - requires the writer to have s3:ListBucket permission) then continue with the PutObject.

AWS
支援工程師
Suran_N
已回答 2 年前
0
已回答 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南