Get Object or Create It
A 2-step recipe with Amazon S3. We can help you get access.
Recipe · 2 steps
Get Object or Create It
with Amazon S3
Upload an object only when it does not already exist.
- Probe for the object with a HEAD request. A 200 means it exists; a 404 means it must be created.
- Upload the object's binary body because the HEAD request reported it was not present.
What you'll need to have ready
- bucket: The bucket that holds (or will hold) the object.
- objectKey: The key to check for and conditionally write.
- objectBody: The raw object payload to upload when the object is missing.
For your developer
Arazzo workflow amazon-s3:get-or-create-object, 2 operations: HeadObject → PutObject. Specs on APIs.io.