Upload an object
A PUT given a path to an object uploads the request body as an object. A
SHA256 hash of the object is a required header. All objects are limited to 10TB in size. This
operation does not make use of operation specific query parameters, or payload elements. If
versioning is enabled on the bucket, objects will be versioned up to 1,000 times per object in vault mode only. Container mode does not have a limit on how many versions you
can have per object.
Syntax
PUT https://{endpoint}/{bucket-name}/{object-name} # path style
PUT https://{bucket-name}.{endpoint}/{object-name} # virtual host style
Specific headers for SSE-C
Common SSE-C headers are available for buckets using Server Side Encryption with Customer-Provided Keys (SSE-C) enabled.
Other headers
Upload an object with tagging by adding the x-amz-tagging header to an object upload request. For more information, see: Other headers.
Object Lock related header
| Name | Description | Required |
|---|---|---|
| x-amz-object-lock-mode |
The object lock mode to be applied to the uploaded object.
Note: Objects uploaded to an Object
Lock enabled bucket with a default configuration rule OR uploaded with Object Lock specific headers
require a Content-MD5 header (or use of V4 signature with content signing) or with a x-am-checksum-
header included as a confirmation of request payload integrity.
|
Required if RetainUntilDate header is used; otherwise, no. |
| x-amz-object-lock-retain-until-date |
The date and time when the uploaded object’s Object Lock is to expire.
Note: Objects uploaded to an Object
Lock enabled bucket with a default configuration rule OR uploaded with Object Lock specific headers
require a Content-MD5 header (or use of V4 signature with content signing) or with a x-am-checksum-
header included as a confirmation of request payload integrity.
|
Required if Mode header is used; otherwise, no. |
| x-amz-object-lock-legal-hold |
The Legal Hold state to be applied to the object.
Note: Objects uploaded to an Object
Lock enabled bucket with a default configuration rule OR uploaded with Object Lock specific headers
require a Content-MD5 header (or use of V4 signature with content signing) or with a x-am-checksum-
header included as a confirmation of request payload integrity.
|
No |
Sample request
PUT /example-bucket/queen-bee HTTP/1.1
Authorization: {authorization-string}
x-amz-date: 20160825T183001Z
x-amz-content-sha256: 309721641329cf441f3fa16ef996cf24a2505f91be3e752ac9411688e3435429
x-amz-tagging: tag1=value1&tag2=value2
Content-Type: text/plain; charset=utf-8
Host: 67.228.254.193
Content-Length: 533
The 'queen' bee is developed from larvae selected by worker bees and fed a
substance referred to as 'royal jelly'. After a short while the 'queen' is
the mother of nearly every bee in the hive, and the colony will fight
fiercely to protect her.
Sample response
HTTP/1.1 200 OK
Date: Thu, 25 Aug 2016 18:30:02 GMT
X-Clv-Request-Id: 9f0ca49a-ae13-4d2d-925b-117b157cf5c3
Accept-Ranges: bytes
Server: Cleversafe/3.9.0.121
X-Clv-S3-Version: 2.5
x-amz-request-id: 9f0ca49a-ae13-4d2d-925b-117b157cf5c3
ETag: "3ca744fa96cb95e92081708887f63de5"
Content-Length: 0
Sample request using SSE-C
PUT /example-bucket/queen-bee HTTP/1.1
Authorization: {authorization-string}
x-amz-date: 20160825T183001Z
x-amz-content-sha256: 309721641329cf441f3fa16ef996cf24a2505f91be3e752ac9411688e3435429
x-amz-server-side-encryption-customer-algorithm: AES256
x-amz-server-side-encryption-customer-key: MjRCRTJCQTNDQjdFOTkyMzY0NjZEN0NBMDhGQTBGRUQwNzFBMjEwMkQyNjU4MjNEOEMy
ODU5MkQxQ0ZEMkQ1OQ==
x-amz-server-side-encryption-customer-key-MD5: HBbrEt+ZH5iIfDNeBju03w==
Content-Type: text/plain; charset=utf-8
Host: 67.228.254.193
Content-Length: 533
The 'queen' bee is developed from larvae selected by worker bees and fed a
substance referred to as 'royal jelly'. After a short while the 'queen' is
the mother of nearly every bee in the hive, and the colony will fight
fiercely to protect her.
Sample response
HTTP/1.1 200 OK
Date: Thu, 25 Aug 2016 18:30:02 GMT
X-Clv-Request-Id: 9f0ca49a-ae13-4d2d-925b-117b157cf5c3
Accept-Ranges: bytes
Server: Cleversafe/3.9.0.121
X-Clv-S3-Version: 2.5
x-amz-request-id: 9f0ca49a-ae13-4d2d-925b-117b157cf5c3
ETag: "3ca744fa96cb95e92081708887f63de5"
x-amz-server-side-encryption-customer-algorithm: AES256
x-amz-server-side-encryption-customer-key-MD5: HBbrEt+ZH5iIfDNeBju03w==
Content-Length: 0
Sample request using Object Lock
PUT /example-bucket/queen-bee HTTP/1.1
Authorization: {authorization-string}
x-amz-date: 20160825T183001Z
x-amz-content-sha256: 309721641329cf441f3fa16ef996cf24a2505f91be3e752ac9411688e3435429
x-amz-tagging: tag1=value1&tag2=value2
x-amz-object-lock-mode:COMPLIANCE
x-amz-object-lock-retain-until-date : <ISO8601 date and time>
x-amz-object-lock-legal-hold: ON
Content-MD5: <MD5 of Contents>
Content-Type: text/plain; charset=utf-8
Host: 67.228.254.193
Content-Length: 533
The 'queen' bee is developed from larvae selected by worker bees and fed a
substance referred to as 'royal jelly'. After a short while the 'queen' is
the mother of nearly every bee in the hive, and the colony will fight
fiercely to protect her.
Sample response using Object Lock
HTTP/1.1 200 OK
Date: Thu, 25 Aug 2016 18:30:02 GMT
X-Clv-Request-Id: 9f0ca49a-ae13-4d2d-925b-117b157cf5c3
Accept-Ranges: bytes
Server: Cleversafe/3.9.0.121
X-Clv-S3-Version: 2.5
x-amz-request-id: 9f0ca49a-ae13-4d2d-925b-117b157cf5c3
ETag: "3ca744fa96cb95e92081708887f63de5"
Content-Length: 0