Move an Object
A 3-step recipe with Amazon S3. We can help you get access.
Recipe · 3 steps
Move an Object
with Amazon S3
Copy an object to a new key, confirm it, then delete the source.
- Server-side copy the source object to the destination key.
- HEAD the destination key to confirm the copy succeeded before removing the source.
- Delete the source object now that the destination copy is confirmed, completing the move.
What you'll need to have ready
- sourceBucket: The bucket holding the source object.
- sourceKey: The key of the source object to move.
- destinationBucket: The bucket the object is moved to.
- destinationKey: The key the object is moved to.
- copySource: The x-amz-copy-source value, e.g. /sourcebucket/sourcekey (URL-encoded path).
For your developer
Arazzo workflow amazon-s3:move-object, 3 operations: CopyObject → HeadObject → DeleteObject. Specs on APIs.io.