S3 copy an object
To copy an object, use PUT and specify a destination bucket and the object
name.
Syntax
PUT /_DEST_BUCKET_/_DEST_OBJECT_ HTTP/1.1
x-amz-copy-source: _SOURCE_BUCKET_/_SOURCE_OBJECT_
Request Headers
x-amz-copy-source
- Description
-
The source bucket name + object name.
- Valid Values
-
BUCKET_/_OBJECT - Required
-
Yes
x-amz-acl
- Description
-
A canned ACL.
- Valid Values
-
private,public-read,public-read-write,authenticated-read - Required
-
No
x-amz-copy-if-modified-since
- Description
-
Copies only if modified since the timestamp.
- Valid Values
-
Timestamp
- Required
-
No
x-amz-copy-if-unmodified-since
- Description
-
Copies only if unmodified since the timestamp.
- Valid Values
-
Timestamp
- Required
-
No
x-amz-copy-if-match
- Description
-
Copies only if object ETag matches ETag.
- Valid Values
-
Entity Tag
- Required
-
No
x-amz-copy-if-none-match
- Description
-
Copies only if object ETag matches ETag.
- Valid Values
-
Entity Tag
- Required
-
No
Response Entities
CopyObjectResult
- Description
-
A container for the response elements.
- Type
-
Container
LastModified
- Description
-
The last modified date of the source object.
- Type
-
Date
Etag
- Description
-
The ETag of the new object.
- Type
-
String