Amazon S3 Library for REST in Java

Sample Code & Libraries>Amazon S3 Library for REST in Java
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

A library in Java for working with the Amazon S3 REST interface.


Submitted By: EricW@AWS
AWS Products Used: Amazon S3
Language(s): Java
License: New BSD
Created On: March 13, 2006 7:15 PM GMT
Last Updated: January 2, 2009 9:31 PM GMT

About This Sample

  • A library in Java for working with the Amazon S3 REST interface.
  • Part of a collection of interface libraries, each in a different language.
  • See the README file in the download for more information about the sample.

What's New?

  • 2009-01-02: Updates for requester-pays feature
  • 2007-11-05: Updates to support EU
  • 2007-05-18: Updates to support signed HTTP requests to virtual hosted buckets.
  • 2006-10-02: Updates for server access logging.
  • 2006-06-16: Updates to use the list delimiter.


Running the Sample

  • See the README file in the attached download for information on running the sample.


Simple but very limited.
From the documentation: "One of the main limitations of these sample AWSAuthConnection implementations is that the interfaces are not streaming." <-- UNACCEPTABLE, IMPRACTICAL FOR MOST USES. "These libraries have nearly non-existent error handling" <-- BAD IMPLEMENTATION Besides the two no-nos above, should be OK.
dariojogatina on January 25, 2009 8:41 PM GMT
Where is the definitive copy of this code located? is it in any Maven repository?
I've seen this code for AWSAuthConnection, etc. in several different places now (the Eclipse plugin for one). Where is the definitive source, is this it? is it somewhere packaged in a versioned jar that's being maintained? is it available via a Maven repository? Thanks
Brian Coan on September 10, 2007 5:52 PM GMT
thanks 1m ninjacodersass
never would have figured out to read the response... cool.
mariacheese on September 8, 2007 7:21 AM GMT
Make sure to read the response.
One thing I noticed while using this library -- you need to make sure to read the response from your get, put or delete request. Otherwise, the HTTP request won't be completed (or perhaps even sent) by HttpURLConnection. Calling just awsAuthConnection.delete(fooBucket, fooObject, null) will probably not delete your object, but awsAuthConnection.delete(fooBucket, fooObject, null).connection.getResponseMessage() will. This caveat could have been better documented. Otherwise, this is a pretty easy-to-use library for somebody just getting started with S3.
ninjacodersass on March 12, 2007 8:07 PM GMT
Worked with Java 1.5
Java 1.5 worked fine, but 1.4.2 has the same error reported earlier. The readme has almost no instructions on how to compile and run. To do the thing on linux, 0. unpack it and cd into s3-example-libraries/java. 1. Edit both and to use your access ID key and secret key. 2. Compile with find . -name "*.java"| xargs javac -d . 3. Run tests with java -cp . S3Test and then run the example with java -cp . S3Drive
Marlon Pierce on February 13, 2007 6:47 PM GMT
Code provided does not compile in Sun JDK 1.4.2_13
The code provided does not compile in Sun JDK 1.4.2_13. Line # 169 in throws an error. Method parseBoolean in class Boolean is introduced in JDK 1.5 onwards.
seeknew on January 18, 2007 11:43 AM GMT
Where is the beef?
Where is the download?
ObjectWorks Media on November 15, 2006 2:30 AM GMT
We are temporarily not accepting new comments.
©2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.