Fork of the official AWS SDK for Java, modified to work from within Google App Engine.
Pull request Compare This branch is 4 commits ahead of apcj:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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.


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:

$ ant


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:

    <version>[1.1, 2.0)</version>

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.