RetrievingObjectVersions
Retrieving Object Versions
A simple GET
request retrieves the current version of an object. The following figure shows how GET
returns the current version of the object, photo.gif
.
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, How Do I See the Versions of an S3 Object? in the Amazon Simple Storage Service Console User Guide.
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.
Using REST
To retrieve a specific object version
Set
versionId
to the ID of the version of the object you want to retrieve.Send a
GET Object versionId
request.
Example Retrieving a Versioned Object
The following request retrieves version L4kqtJlcpXroDTDmpUMLUo of my-image.jpg
.