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.
There are two possibilities for building the GAE version of the SDK.
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
Additionally, you can also build with Ant (>= 1.8.1) using the provided
build.xml file. Just run the default target with:
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.