S3 get an object from a bucket
Use the S3 GET command to retrieve an object from a bucket.
Retrieve an object from a bucket.
GET /BUCKET/OBJECT HTTP/1.1Add the
versionId subresource to retrieve a particular version of the
object.GET /BUCKET/OBJECT?versionId=VERSION_ID HTTP/1.1Request headers
partNumber-
- Description
-
Part number of the object being read. This enables a ranged
GETrequest for the specified part. Using this request is useful for downloading just a part of an object. - Valid values
-
A positive integer between 1 and 10,000.
- Required
-
No
range-
- Description
-
The range of the object to retrieve.Note: Multiple ranges of data per GET request are not supported.
- Valid values
-
Range:bytes=beginbyte-endbyte
- Required
-
No
if-modified-since-
- Description
-
Gets only if modified since the timestamp.
- Valid values
-
Timestamp
- Required
-
No
if-unmodified-since-
- Description
- Gets only if not modified since the timestamp.
- Valid values
- Timestamp
- Required
- No
if-match-
- Description
-
Gets only if object ETag does not match ETag.
- Valid values
-
Entity Tag
- Required
-
No
if-none-match-
- Description
-
Gets only if object ETag matches ETag.
- Valid values
-
Entity Tag
- Required
-
No
Example syntax with request
headers:
GET /BUCKET/OBJECT?partNumber=PARTNUMBER&versionId=VersionId HTTP/1.1
Host: Bucket.s3.amazonaws.com
If-Match: IfMatch
If-Modified-Since: IfModifiedSince
If-None-Match: IfNoneMatch
If-Unmodified-Since: IfUnmodifiedSince
Range: RangeResponse headers
| Response header | Description |
|---|---|
Content-Range |
Data range. Only returned if the range header field was specified in the request. |
x-amz-version-id |
Returns the version ID or null. |