PUT Object

Adds an object to a bucket. Success responses are issued only after an entire object is added to the bucket. Partial addition of an object causes a rollback. The PUT Object operation requires WRITE permissions for the bucket.

Object locking is not supported. If an object with the same name is added to the bucket by multiple PUT Object operations, only the last request is not overwritten.

Request syntax

PUT /ObjectName HTTP/1.1
Host: BucketName.rs2.StorageService.com
Date: date
Authorization: signatureValue

Request headers

You can use the following common request headers with the PUT Object operation: Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Length, Content-MD5, Content-Type, Date, Expect, Expires, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Range, x-amz-acl, and x-amz-meta-.

The Authorization, Content-Length, Date, and Host headers are required; all others are optional. For more Request Headers.

Response headers

The PUT Object operation may include the following response headers: Content-Length, Connection, Date, ETag, and Server.

For more information about supported response headers, see Response Headers.


Request sample

This sample places the hosts object in the docs bucket:

PUT /hosts HTTP/1.1
Host: docs.demo.cloud.it
Authorization: AWS pat:N59mYuFeL3H/2/5MD2Kl01X5PWo=
Content-Length: 3507
Content-Type: binary/octet-stream
Date: Tue, 21 Jun 2011 12:16:00 GMT
Response sample
HTTP/1.1 200 OK
Date: Tue, 21 Jun 2011 12:21:30 GMT
Server: RestServer/1.0
Content-Length: 0
ETag: "03d6b34cd7f0328a2a079ef2f58e7bbc"
Content-Type: application/octet-stream
Cache-Control: no-cache
Connection: close