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 ?

preguntada hace 2 años3985 visualizaciones
2 Respuestas
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
INGENIERO DE SOPORTE
Suran_N
respondido hace 2 años
0
respondido hace 8 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas