title: Android Amazon Web Services Unable to execute HTTP request: sdb.amazonaws.com
body: <p>I have been getting the following errors when saving to the amazon SimpleDB. </p>
  
  <p>My code (taken from amazon tutorial):</p>
  
  <pre><code>Account.getSimpleDB().createDomain(new CreateDomainRequest(Account.getDomain()));
  </code></pre>
  
  <p>The Account class methods (getSimpleDB() and getDomain() I've tested and work. The problem is most certainly taking place in the amazon methods of createDomain() or CreateDomainRequest()</p>
  
  <p>The Errors:</p>
  
  <pre><code>01-30 13:35:54.645: E/AndroidRuntime(595): com.amazonaws.AmazonClientException: Unable to execute HTTP request: sdb.amazonaws.com
  01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.http.AmazonHttpClient.executeHelper(Unknown Source)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.http.AmazonHttpClient.execute(Unknown Source)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.services.simpledb.AmazonSimpleDBClient.invoke(Unknown Source)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.services.simpledb.AmazonSimpleDBClient.createDomain(Unknown Source)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at com.zbien.pizza.Account.save(Account.java:72)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at com.zbien.pizza.Account$1.run(Account.java:231)
  01-30 13:35:54.645: E/AndroidRuntime(595): Caused by: java.net.UnknownHostException: sdb.amazonaws.com
  01-30 13:35:54.645: E/AndroidRuntime(595):  at java.net.InetAddress.lookupHostByName(InetAddress.java:497)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at java.net.InetAddress.getAllByName(InetAddress.java:256)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
  01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
  01-30 13:35:54.645: E/AndroidRuntime(595):  ... 6 more
  </code></pre>
  
  <p>What is very strange to me is that sometimes I run the code it works, but other times, it doesn't. It seems maybe that if I change wireless networks then it stops working, though I am not sure about that theory. I have tested the code on my actual phone and never found an issue, but running it on my 2.3.3 emulator sometimes I get the following errors... but not always. Lastly, I do have the INTERNET android permission and I do currently have a working wireless connection. </p>
  
  <p>Any ideas? Thanks in advance...</p>