|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
Amazon Web Services provides SDKs for you to develop applications for Amazon Glacier. The SDK libraries wrap the underlying Amazon Glacier API, simplifying your programming tasks. For example, for each request sent to Amazon Glacier, you must include a signature to authenticate your requests. When you use the libraries, you only need to provide your AWS security credentials in your code and the libraries compute the necessary signature and include it in the request sent to Amazon Glacier. These SDKs provide libraries that map to underlying REST API and provide objects that enable you to easily construct requests and process responses.
Amazon Glacier is supported by the AWS SDKs for Java, .NET, PHP, and Python (Boto). Examples of working with Amazon Glacier using the Java and .NET SDKs are provided throughout this developer guide. For more information on the AWS SDKs, see Sample Code & Libraries.
The AWS SDKs for Java and .NET offer high-level and low-level wrapper libraries.
The low-level wrapper libraries map closely the underlying REST API (API Reference for Amazon Glacier) supported by Amazon Glacier. For each Amazon Glacier REST operations, the low-level API provides a corresponding method, a request object for you to provide request information and a response object for you to process Amazon Glacier response. The low-level wrapper libraries are the most complete implementation of the underlying Amazon Glacier operations.
To further simplify application development, these libraries offer a higher-level abstraction for some of the operations. For example,
Uploading an archive—To upload an archive using the low-level API in addition to the file name and the vault name where you want to save the archive, you you will need to provide a checksum (SHA-256 tree hash) of the payload. However, the high-level API computes the checksum for you.
Downloading an archive or vault inventory—To download an archive using the low-level API you first initiate a job, wait for the job to complete, and then get the job output. You will need to write additional code to set up an Amazon Simple Notification Service (Amazon SNS) topic for Amazon Glacier to notify you when the job is complete. You also need some polling mechanism to check if a job completion message was posted to the topic. The high-level API provides a method to download an archive that takes care of all these steps. You only specify an archive ID and a folder path where you want to save the downloaded data.
In general, if the high-level API provides methods you need to perform an operation, you should use the high-level API because of the simplicity it provides. However, if the high-level API does not offer the functionality, you can use the low-level API. Additionally, the low-level API allows granular control of the operation such as retry logic in the event of a failure. For example, when uploading an archive the high-level API uses the file size to determine whether to upload the archive in a single operation or use the multipart upload API. The API also has built-in retry logic in case an upload fails. However, your application might need granular control over these decisions, in which case you can use the low-level API.