jsonWriter.endObject();
String snippet = stringWriter.toString();
byte[] content = snippet.getBytes("UTF-8");
request.setContent(new StringInputStream(snippet));
request.addHeader("Content-Length", Integer.toString(content.length));
} catch(Throwable t) {
throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
}