**This is an old revision of the document!**

Amazon S3 compatible API

We provide support for another API that is becoming ubiquitous. In this case it is the Amazon S3 API. This is already used in solutions such as Eucalyptus Walrus, and we have now also added it as entry point for any files accessed through a SMEStorage Account. This means you can use the S3 compatible API to access your files on Google Docs, or Google Storage, or RackSpace Cloud Files, or Microsoft OneDrive, or any of the many other Clouds that we support.

For those interested, moving from a file based structure to a flat file object structure was achieved using the depth first algorithm within the implementation mapping to our API.

Below is a practical implementation of using the S3 API.

1 Setting up an S3 Tool to work with SMEStorage

Lets look at a practical implementation of the S3 API using a tool that supports S3 compatible endpoints, CloudBerry explorer. We'll use this to access our Google Docs / Drive, although we could have chosen DropBox, or any other number of clouds to access.

2 Creating a New Account

Choose to add an account and fill in the endpoint as either:

€˜s3.storagemadeeasy.com’ (US Server) or 's3eu.storagemadeeasy.com' (EU Server)

and the QueryID should be set as the SME username. You can obtain the API key from logging into SME going to My Account from the sidebar and copying the API key from where it says API secret Key

3 Confirm Connection

Now you can choose to access the service using the CloudBerry explorer:

4 Accessing Service

You can can now browse, download, upload files directly from your SME Clouds which is happening over the S3 API.

5 Working with Clouds

This screenshot shows the root view of the Google Docs folder being access via CloudBerry using the S3 compatible API. Accessing different Clouds is just as easy as changing directories for Clouds that are mapped to an account.

6 Usefulness

The S3 API can be useful in a number of scenarios. For example:

  • Building an S3 compatible Cloud but using one or more different Storage implementations to deliver it, using the SMEStorage Cloud Appliance.
  • Transitioning from existing S3 use to a different Cloud but without having to change code ie. only changing the endpoint implementation
  • Using S3 Tools and scripts to work with Clouds other than S3

7 Useful Apps

Useful Apps for interacting with SME over the Amazon S3 API are:

8 Note!

SME S3 API does not support multi-part upload (as it makes no sense   as we interacting with back end clouds that do not support it).

Certain S3 client tools may need you to change a setting to turn off multi-part upload.

For example you need to do this with Cyberduck.Multipart uploads can be disabled by setting the hidden option s3.upload.multipart to false..   See https://trac.cyberduck.ch/wiki/help/en/howto/s3 for further information.

SME supports the following Amazon S3 API Requests:

PUT request to create a bucket http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUT.html

GET bucket location http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlocation.html

DELETE delete bucket http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETE.html

GET to list buckets http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTServiceGET.html

GET to list contents of a bucket (objects list) http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html

PUT object to upload new file http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html

DELETE to delete object from bucket http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html

PUT with header x-amz-copy-source to copy object http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html

HEAD to get object metadata http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD.html