title: Amazon CloudSearch query
body: <p>I am at a lost on how to query my Amazon CloudSearch from a static HTML page. Although the documentation is good there are no examples beyond copying and pasting a URL in a browser.</p>
  
  <p>What I would like is an HTML page in S3, so no server side code allowed, to have a text field form that when the search button is clicked fires to my CloudSearch end point and returns the results</p>
  
  <p>CloudSearch responds with JSON, so will have to parse that and make a table of the results.</p>
  
  <p>So far I have been working with a saved JSON of the results locally and using Jquery to read the JSON file</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;JSON Sample&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="placeholder"&gt;&lt;/div&gt;
      &lt;script src="http://code.jquery.com/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
    $.getJSON('search.json', function(data) {
  
      var output="&lt;ul&gt;";
          for (var i in data.hit) {
              output+="&lt;li&gt;" + data.hit[i].id+ "&lt;/li&gt;";
          }
  
          output+="&lt;/ul&gt;";
          document.getElementById("placeholder").innerHTML=output;
  
          console.log(data);
    });
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This gives me the ID for the record.</p>
  
  <p>But when I try and change the URL to the CloudSearch end point I get no data back. Having read and gone round in circles I believe it is because of CORS.</p>
  
  <p>However, Amazon's documentation just say to use an HTTP GET on the endpoint but how do I build that into my HTML page.</p>
  
  <p>Sorry for such a basic question</p>