title: aws api error The action DescribeRegions is not valid for this web service
body: <p>i need to know different aws ec2 regions
  i know aws has command line tools for this but i want to use aws api so
  i generated following query request for accessing aws ec2 api</p>
  
  <p><a href="https://ec2.amazonaws.com/?Action=DescribeRegions&amp;AWSAccessKeyId=" rel="nofollow">https://ec2.amazonaws.com/?Action=DescribeRegions&amp;AWSAccessKeyId=</a>&amp;Version=2013-02-01&amp;Timestamp=2013-05-24T12%3A35%3A00Z&amp;SignatureVersion=2&amp;SignatureMethod=HmacSHA256&amp;Signature=xkw62EsVWEpc3rodXADy4Q3LOquKKfHmVHrrIIGQCg0=</p>
  
  <p>for which i got the following response</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  * Connection #0 to host ec2.amazonaws.com left intact
  * Closing connection #0
  * SSLv3, TLS alert, Client hello (1):
  &lt;Response&gt;
  &lt;Errors&gt;
   &lt;Error&gt;
     &lt;Code&gt;InvalidAction&lt;/Code&gt;
     &lt;Messaged &gt;The action urn:Post is not valid for this web service.&lt;/Message&gt;
  &lt;/Error&gt;&lt;/Errors&gt;
  &lt;RequestID&gt;4a33917f-3403-4ebc-9a85-4b5393a031c6&lt;/RequestID&gt;
  &lt;/Response&gt;
  </code></pre>
  
  <p>[1]   Done curl -v -get --data-urlencode DATA <a href="https://ec2.amazonaws.com/?action=DescribeRegions" rel="nofollow">https://ec2.amazonaws.com/?action=DescribeRegions</a></p>
  
  <p>[2]   Done                    AWSAccessKeyId=</p>
  
  <p>[3]   Done                    Version=2013-02-01</p>
  
  <p>[4]   Done                    Timestamp=2013-05-24T12%3A35%3A00Z</p>
  
  <p>[5]-  Done                    SignatureVersion=2</p>
  
  <p>[6]+  Done                    SignatureMethod=HmacSHA256</p>
  
  <p>i signed this request query  follwing cmd bash scipt</p>
  
  <pre><code> #!/bin/bash
  
  q='GET
  ec2.amazonaws.com
  /
  AWSAccessKeyId=&lt;aws acces_key&gt;&amp;Action=DescribeRegions&amp;SignatureMethod=HmacSHA256&amp;SignatureVersion=2&amp;Timestamp=2013-05-24T12%3A35%3A00Z&amp;Version=2013-02-01'
  
  echo -n "$q" | openssl dgst -sha256 -hmac "&lt;aws secret key&gt;" -binary | openssl enc -base64
  </code></pre>
  
  <p>output was : xkw62EsVWEpc3rodXADy4Q3LOquKKfHmVHrrIIGQCg0=
  and then i gave this curl request separately away from above bash script.</p>
  
  <pre><code>$curl -v -get --data-encode DATA https://ec2.amazonaws.com/?Action=DescribeRegions&amp;AWSAccessKeyId=&lt;aws access key&gt;&amp;Version=2013-02-01&amp;Timestamp=2013-05-24T12%3A35%3A00Z&amp;SignatureVersion=2&amp;SignatureMethod=HmacSHA256&amp;Signature=xkw62EsVWEpc3rodXADy4Q3LOquKKfHmVHrrIIGQCg0=
  </code></pre>
  
  <p>can any 1 tell me where i m going wrong?</p>