Archive for May, 2007

ActionScript Library for Amazon S3

I’ve been working on an Amazon S3 client in Apollo, and I finally got around to extracting the S3 library and making it its own project. I put it up on Google Code under the name as3awss3lib.

The library will only work in Apollo because there are too many restrictions in the browser player for it to work. Since I knew it wouldn’t work in the browser anyway, I went ahead and used some Apollo APIs. It also has dependencies on As3Crypto, as3corelib, and Flex (you can use the free Flex SDK).

I haven’t implemented everything S3 supports yet. Specifically, I haven’t implemented access control (everything is private) and the bucket listing pagination functionality. But all the hard protocol work is there so the rest is easy to add. Right now, you can:

  • Get a list of buckets.
  • Create new buckets.
  • Delete buckets.
  • Upload objects.
  • Download objects.
  • Delete objects.
  • Get a temporary public URL to an object.

I’ll release the application I’m building on top of the library as soon as we update the public release of Apollo. It allows you to drag and drop and copy and paste files to and from S3.