Retrieving Object Versions
GET request retrieves the current version of an
object. The following figure shows how
GET returns the current
version of the object,
To retrieve a specific version, you have to specify its version ID. The following
figure shows that a
GET versionId request retrieves the
specified version of the object (not necessarily the current one).
Using the Console
For instructions see, Downloading an Object in the Amazon Simple Storage Service Console User Guide. You will need to click the Show button in the console to list all object versions.
Using the AWS SDKs
For examples of uploading objects using AWS SDKs for Java, .NET, and PHP, see Getting Objects. The examples for uploading objects in a nonversioned and versioning-enabled buckets are the same, although in the case of versioning-enabled buckets, Amazon S3 assigns a version number. Otherwise, the version number is null.
For information about using other AWS SDKs, see Sample Code and Libraries.
To retrieve a specific object version
versionIdto the ID of the version of the object you want to retrieve.
GET Object versionIdrequest.
Example Retrieving a Versioned Object
The following request retrieves version L4kqtJlcpXroDTDmpUMLUo of
Copy to clipboard
GET /my-image.jpg?versionId=L4kqtJlcpXroDTDmpUMLUo HTTP/1.1 Host: bucket.s3.amazonaws.com Date: Wed, 28 Oct 2009 22:32:00 GMT Authorization: AWS AKIAIOSFODNN7EXAMPLE:0RQf4/cRonhpaBX5sCYVf1bNRuU=