title: aws sdk sqs neither sending message or showing errors but stuck forever
body: <p>I'm trying to use aws sdk to test <a href="https://github.com/p4tin/goaws" rel="nofollow noreferrer">goaws</a> but my following program just hangs forever. Can anyone explain what I'm doing wrong here?</p>
  <pre class="lang-js prettyprint-override"><code>var AWS = require('aws-sdk');
  var endpoint = new AWS.Endpoint('http://localhost:4100')
  AWS.config.update({region: 'us-east-1'}, {endpoint});
  
  // Create an SQS service object
  var sqs =  new AWS.SQS({apiVersion: '2012-11-05'});
  
  var params = {
      DelaySeconds: 10,
      MessageAttributes: {
          &quot;Name&quot;: {
              DataType: &quot;String&quot;,
              StringValue: &quot;AAAA&quot;
          },
          &quot;SurName&quot;: {
              DataType: &quot;String&quot;,
              StringValue: &quot;BBBB&quot;
          }
      },
      MessageBody: &quot;whats up&quot;,
      QueueUrl: &quot;http://us-east-1.goaws.com:4100/100010001000/local-queue1&quot;
  };
  
  sqs.sendMessage(params, function(err, data) {
      if (err) {
          console.log(&quot;Error&quot;, err);
      } else {
          console.log(&quot;Success&quot;, data.MessageId);
      }
  });
  </code></pre>
  <p>The sqs queue URL I tried testing with AWS cli and it does work. So there is something wrong in program which I don't understand.</p>
  <pre><code>aws sqs send-message --region us-east-1 --endpoint-url http://localhost:4100 --queue-url http://us-east-1.goaws.com:4100/100010001000/local-queue1 --message-body &quot;Hello from Amazon SQS.&quot;
  </code></pre>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;MD5OfMessageBody&quot;: &quot;c5dba0dd8f89fe763f66cbddb9c37cb7&quot;,
    &quot;MD5OfMessageAttributes&quot;: &quot;&quot;,
    &quot;MessageId&quot;: &quot;f5a8ce0d-983f-4fb5-b517-153d2c56c08b&quot;,
    &quot;SequenceNumber&quot;: &quot;&quot;
  }
  </code></pre>