0xDECAFBAD

It's all spinning wheels and self-doubt until the first pot of coffee.

Parameterize your service URL for the S3 REST API

One more rapid fire thought on Amazon S3: If you're building an app that talks to the S3 REST API, please parameterize the base URL used to access the service. Make it a config file parameter or a control panel setting or whatever. This API will be cloned.

And an issue related to that: Say you find that the base URL to an S3 clone is http://example.com/foo/myS3/service.php - this path shouldn't be included in the resource path. That is, accessing key "/bar/baz" in bucket "/foo" should not result in a resource path of /foo/myS3/service.php/foo/bar/baz. Instead it should simply be /foo/bar/baz. This is important for the authentication scheme when used in a clone.