S3Store s3 = new S3Store("s3.amazonaws.com", ACCESS_KEY, SECRET_KEY);
// upload an item as public-read
s3.storeItem("test", new String("hello").getBytes(), "public-read");
// upload a js file, with a cache control-header
final Map<String, List<String>> headers = new HashMap<String, List<String>>();
headers.put("Cache-Control", Collections.singletonList("max-age=300, must-revalidate"));
s3.storeItem("test2.js", new String("document.write('hello');").getBytes(), "public-read", headers);
Download it here.
Currently, you can only do this while storing keys, and there's no way to retrieve this data later. Still, it was enough of a pain to get this working correctly with the request signing, so I figured I'd share the code anyway.