title: How to connect to AWS Elasticsearch?
body: <p>I'm trying to connect to AWS Elasticsearch but I always get the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
  at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:278)
  at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:197)
  at org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
  at org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:98)
  at org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:334)
  at org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:313)
  at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
  at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)
  at com.c_backendcrawler.utility.ElasticSearch.uploadObject(ElasticSearch.java:25)
  at com.c_backendcrawler.Start.main(Start.java:34)
  </code></pre>
  
  <p>My code is following:</p>
  
  <pre><code> //Create Client
      Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "zencubes-search").put("node.name","Darkhawk").build();
      TransportClient transportClient = new TransportClient(settings);
      transportClient.addTransportAddress(new InetSocketTransportAddress(
              "x.x.x.x",9300));
      return transportClient;
  </code></pre>
  
  <p>Output from AWS Elasticsearch:</p>
  
  <pre><code>    {
  status: 200,
  name: "Darkhawk",
  cluster_name: "817880037706:zencubes-search",
  version: {
  number: "1.5.2",
  build_hash: "62ff9868b4c8a0c45860bebb259e21980778ab1c",
  build_timestamp: "2015-04-27T09:21:06Z",
  build_snapshot: false,
  lucene_version: "4.10.4"
  },
  tagline: "You Know, for Search"
  }
  </code></pre>
  
  <p>I tried to curl (<a href="https://search-zencubes-search-xxxxxxxx.eu-west-1.es.amazonaws.com/" rel="noreferrer">https://search-zencubes-search-xxxxxxxx.eu-west-1.es.amazonaws.com/</a> ) and it works - but not on port 9300. What am I doing wrong here? </p>