Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Using the AWS SDK for PHP

The AWS SDK for PHP provides the API for Amazon S3 bucket and object operations. The API gives you the option of using a high-level or low-level API.

Low-Level API

The low-level APIs correspond to the underlying Amazon S3 REST operations, including the create, update, and delete operations on buckets and objects. The APIs provides greater control over these operations. For example, you can batch your requests and execute them in parallel, or when using the multipart upload API (see Uploading Objects Using Multipart Upload API), you can manage the object parts. Note that these low-level API calls return a response that includes all the Amazon S3 response details.

High-Level API

The high-level APIs are intended to simplify common use cases. For example, for uploading large objects using the low-level API, you must first initialize the multipart upload by calling the initiate_multipart_upload(), uploads parts by calling the upload_part() method and complete the upload by calling the complete_multipart_upload() methods. Instead, you could use the high-level API and upload object by calling the create_mpu_object() method. Internally, this API calls the low-level API to initialize the upload, upload object parts and complete the multipart upload. Another example is when enumerating objects in a bucket you can use the high-level API which returns all the keys, regardless of how many objects you have stored in the bucket. If you use the low-level API the response returns only up to 1,000 keys and if you have more than a 1,000 objects in the bucket, the result will be truncated and you will have to manage the response and check for any truncation.