GET Object
The GET Object retrieves S3 objects. To use this operation, you must have READ access to the object. If READ access is granted to an anonymous user, the object is returned without an authorization header. Note that the GET Object operation, by default, returns the current version of an object. To return a different version, use the versionId
subresource. In cases where the current version of the object is a delete marker, S3 behaves as if the object was deleted and includes x-amz-delete-marker: true
in the response.
Request Parameters
This implementation of the GET Object operation does not support the use of request parameters.
Request Headers
The GET Object operation supports the use of the following request headers:
-
Request headers that are common to all operations. For more information, see table "Common Supported Request Headers" in Supported Common Request Headers.
-
Request headers for retrieving objects. For a description of these request headers, see GET Object.
Response Headers
The GET Object operation supports the use of response headers. For a description of the response headers supported for the GET Object operation, see GET Object.
Response Elements
This implementation of the GET Object operation does not return response elements.
Error Response Code
This implementation of the GET Object operation does not return special errors. For general information about S3 errors and a list of error codes, see S3 Client Error Handling Reference.
Example
GET /my-image.jpg HTTP/1.1 200 OK x-amz-request-id: tx318BC8BC148832E5 Date: Mon, 3 Oct 2016 22:32:00 GMT Last-Modified: Wed, 12 Oct 2009 17:50:00 GMT ETag: "fba9dede5f27731c9771645a39863328" Content-Length: 434234 [434234 bytes of object data]
Example Response when the Latest Object is a Delete Marker
HTTP/1.1 404 Not Found x-amz-request-id: 318BC8BC148832E5 x-amz-version-id: 003 x-amz-delete-marker: true Date: Wed, 28 Oct 2018 22:32:00 GMT Content-Type: text/plain Connection: close
Example Request Getting a Specified Version of an Object
GET /myObject?versionId=002 HTTP/1.1 Date: Wed, 28 Oct 2018 22:32:00 GMT Authorization: authorization string HTTP/1.1 200 OK x-amz-request-id: 318BC8BC148832E5 Date: Wed, 28 Oct 2009 22:32:00 GMT Last-Modified: Sun, 1 Jan 2018 12:00:00 GMT x-amz-version-id: 002 ETag: "fba9dede5f27731c9771645a39863328" Content-Length: 434234 Content-Type: text/plain Connection: close [434234 bytes of object data]