Skip to content

Fork of the official AWS SDK for Java, modified to work from within Google App Engine.

License

Notifications You must be signed in to change notification settings

buckett/aws-sdk-for-java-on-gae

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS SDK for Java on GAE

The official AWS SDK for Java doesn't work on Google App Engine, because the SDK uses the Apache HttpClient whose socket creation antics are not permitted inside the GAE sandbox. There are a number of ways of working around this problem, but this particular fork takes the brute force approach of ripping out Apache HttpClient, and hardwiring the GAE-specific UrlFetchService in its place.

Notable changes from the official version

The SDK was already pretty well isolated from Apache HttpClient, so the code changes are pretty much contained to a single class com.amazonaws.http.HttpClient.

Also, dependencies have changes, since the library now depends on the Google App Engine API, and no longer depends on Apache HttpClient.

Building

There are two possibilities for building the GAE version of the SDK.

Maven

Nothing has changed in the Maven department from the official version. It seems to work fine with default Maven settings, fetching all dependencies from public repositories.

$ mvn clean package

Ant

Additionally, you can also build with Ant (>= 1.8.1) using the provided build.xml file. Just run the default target with:

$ ant

Using

If you have an existing GAE app, just drop the jar output from this project into yours. GAE apps don't use Maven by default, so you'll have to fish these dependencies from your local maven repository, or find them somewhere else:

<dependency>
    <groupId>commons-logging</groupId>
    <artifactId>commons-logging</artifactId>
    <version>[1.1, 2.0)</version>
</dependency>
<dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>1.3</version>
</dependency>
<dependency>
    <groupId>org.codehaus.jackson</groupId>
    <artifactId>jackson-core-asl</artifactId>
    <version>[1.4,)</version>
    <type>jar</type>
    <scope>compile</scope>
</dependency>

Why would I want to use the SDK on GAE anyway?

There is a certain class of app that can benefit from combining the flexibility of AWS with the simplicity of GAE. This is particularly relevant for very low traffic apps which can completely shut down their AWS foot print during periods of very low traffic.

About

Fork of the official AWS SDK for Java, modified to work from within Google App Engine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%