The S3 web service application program interface (API) is made available through two interfaces: REST and SOAP. In this book we will use the REST interface.
The S3 service implementation presented in this chapter uses the REST API functionality in the AWS Ruby module. The AWS module includes methods, presented in REST API Implementation” in Chapter 2, that perform authentication, transmission, and response checking of REST API requests.
The REST API interface for the S3 service uses five HTTP methods to perform API operations: GET, HEAD, PUT, DELETE, and POST. The meaning of each method varies slightly, depending on what kind of S3 resource the operation is targeting: an object, a bucket, an Access Control List (ACL), or the S3 service itself. Table 3-1 lists some of the operations you can perform on S3 resources using different HTTP methods.
Table 3-1. Acting on S3 resources with HTTP methods
|S3 Service||List your buckets||-||-||-||-|
|Bucket||List the bucket’s objects||-||Create the bucket||Delete the bucket||-|
|Object||Retrieve the object’s data and metadata||Retrieve the object’s metadata||Create or replace the object||Delete the object||Create or replace the object|
|ACL (for a Bucket or Object resource)||Retrieve ACL settings||-||Apply new ACL settings||-||-|
The most recent S3 API version available when this book was
version number is used as a component of the XML namespace of
documents provided to and produced by the service, http://s3.amazonaws.com/doc/2006-03-01/ ...