Welcome to the new DOCS.vastdata.com. We've added new menus and a version selector, plus new persona and resource pages to help customers get started. Looking for a previous article? Use the docs search.

Creating a copy of an object

Prev Next

The copy_object() method creates a copy of an object already stored on the server.

Example

In this example, we copy the object MyObject from the bucket MyBucket to the bucket MyOtherBucket and name the copy MyObjectCopy.

response = S3_client.copy_object(
    Bucket='MyOtherBucket',
    CopySource='MyBucket/MyObject'
    Key='MyObjectCopy',
)