You’ve probably heard about S3. It’s Amazon’s new storage service that debuted just a couple of days ago. Developers can store data of any kind, up to 5GB per chunk, and retrieve it at will. (The 5GB limit is just for a single file. You can store as much data as you want.) The idea is to provide flexible and reliable data storage using the same scalable model already seen with other Amazon Web Services (AWS), such as the Simple Queue Service, Mechanical Turk and Alexa Web Search. Amazon, in short, is building the backbone for a new kind of Web.
Like the other AWS services, it’s pay as you go. Fifteen cents per gigabyte per month storage, twenty cents per gigabyte transferred. It’s not a super bargain, but it’s not exorbitant and you only pay for what you use. It’s pretty easy to use at that. And of course, you get to use funky amazon URLs like s3.amazonaws.com/erica/elvio, which by themselves are, you know, cool.
Each developer can create buckets to store data. You add stuff to the buckets in key/value pairs. For example, you might create a “New Years 06 Pictures” bucket. The you might add an image called “Champagne Toast” and another called “Counting Down”. These keys allow you to associate a name and a meaning with the data as well as to retrieve the data by name.
Of course, you’re not limited to pictures. You can store text, sounds, video, whatever. If you have a mime-type, you’ve got a place to store it.
Even better, you can defray some of the transfer costs by posting your data using the BitTorrent protocol. Using BitTorrent allows your audience to help shoulder the data transfer bandwidth so you’re not just paying through the nose to Amazon when you’re hosting a popular data item.
Although sufficient to the job, the API is pretty limited. You can create and delete buckets, and add and remove data from them. Which is, in the end, exactly what you need an online storage system to do. (Amazon also allows you to annotate your data with custom tags, but that’s mainly for your own bookkeeping.
From a Mac point of view, none of the original code samples I tried seemed to want to work. For example, my perl libraries and packages didn’t have all the right components and I couldn’t find the right ones over at cpan. So in the end, I wrote everything from scratch which took only a few hours because the Mac rocks for simple Web/XML development. I built a baby sockets package and a HMAC encryption utility in C and then wrote bunches of useful little scripts (all alike) in perl. I’ll probably shove these behind a AppleScript Studio user interface if I get the time
You do have to be very, very precise when working with the APIs. For example, I wanted to make the photo (linked above) publicly readable. The part of the PUT request for this is X-Amz-acl: public-read. However, the part that you have to add to the authentication signature is x-amz-acl:public-read. Notice the difference in capitalization and spacing? Argh. Of course, Amazon did document this idiot design decision, but it was buried deep, deep, deep in the documentation.
Do you have an interest in developing for S3 from the Mac? Or would you like to see me throw my scripts into a GUI? Let me know in the comments.


Please post your code! I've been curious about this API too.
It's a shame the examples didn't work. Have you tried a package manager like DarwinPorts or Fink for installing the right dependencies?
The reason you need to sign the lower case "x-amz-acl" is that HTTP headers are case-insensitive. "X-Amz-Acl" must have the same meaning as "x-AMZ-aCL" If there is a HTTP client library, or an HTTP proxy between your code and Amazon that changes the capitalization after you sign it, the signatures wouldn't match when checked by S3. By signing a "canonicalized" version of the request, these intermediate changes shouldn't matter.
So at CastingWords we use a perl interface we wrote to interact with S3 completely via code. However once in a while having a GUI would be nice - and we're a mac shop.
I'd love to see what you've got when you through your stuff together in to a GUI. I say go for it!
Looks like Leon Brocard has released a perl module - so now there is a way to access S3 from perl that is completely available from CPAN http://search.cpan.org/~lbrocard/Net-Amazon-S3-0.30/lib/Net/Amazon/S3.pm .
I have created a Java app called jSh3ll which is the fastest way to get up and running with S3 if you have Java 5 installed!
Glad to hear I am not the only one struggling to make it work from a Mac. And I am trying to use Leon's perl module...just error's out with
Can't use string ("aws_access_key_id") as a HASH ref while "strict refs" in use at /Library/Perl/5.8.6/Class/Accessor.pm
I wonder if the API is sufficient for someone to create a sharing/syncronization tool like FolderShare, which runs on the Mac, but seems to fail as soon as you throw any significant number of files at it.
Yes, FolderShare is p2p, but it would be nice to have something that worked the same way with s3 storage as the "owner" account. And FS requires client software on every machine, so clearly the application architecture would need to be totally different. It's just a use model that we would really like to subscribe to.
So the client app would in all likelihood need to use metadata libraries to compensate for lack of a server side app, to provide necessary information about modification and maybe even pseudodirectory structure. (limit of 100 buckets? does that mean 100 file-level organizational groups like directories?)
Thanks for mentioning the acl case-and-space issue. John Cormie's comment would make absolute sense EXCEPT that:
a) I found the space difference is significant, i.e. it needs to be there in the HTTP header, and must not be there in the signed version
b) I found the case was significant too, i.e. X-Amz... case was required in the header; whereas in principle we should be able to make the header version look exactly like the signed version if Amazon was agnostic about such things. And it should be!
I created a Cocoa app to interact with S3, with the protocol implemented in Objective-C on top of the Foundation URL loading system: http://people.no-distance.net/ol/software/s3/, let me what you think.
b571ecea16 hi, i`m from india, and i has been very hart by you site)))
this site you can leavI really aggree with you Barry. I m working for a similar kind of company called WiseTypist www.wisetypist.com. We also offer the similar service but at 30% less than their price. You may go with their service really for smaller works but coming to volume you houls really check once with our company
Thank and regards,
Linda