title: "The request must contain the parameter MessageHandle" error when deleting a message from an AWS SQS queue (in Coldfusion)
body: <p>I'm struggling to delete a message once received from an AWS queue. </p>
  
  <p>The function I'm using is:</p>
  
  <pre><code>&lt;cffunction name="deleteMessage" output="true" returntype="void"&gt;
      &lt;cfargument name="uri" type="string" required="true"&gt;
      &lt;cfargument name="messageId" type="string" required="true"&gt;
  
      &lt;cfset var tmp = StructNew()/&gt;
  
      &lt;cfset tmp.dateTimeString = zuluDateTimeFormat(Now())/&gt;
  
      &lt;cfset tmp.fixedData = "ActionDeleteMessage" &amp;
                                  "AWSAccessKeyId#This.awsAccessKeyId#" &amp;
                                  "MessageHandle#Arguments.messageId#" &amp;
                                  "SignatureVersion1" &amp;
                                  "Timestamp#tmp.dateTimeString#" &amp;
                                  "Version#This.sqsVersion#"/&gt;
  
      &lt;cfset tmp.signature = createSignature(tmp.fixedData)/&gt;
  
      &lt;cfhttp method="GET" url="#Arguments.host#" charset="UTF-8"&gt;
          &lt;cfhttpparam type="url" name="Action" value="DeleteMessage"/&gt;
          &lt;cfhttpparam type="url" name="AWSAccessKeyId" value="#This.awsAccessKeyId#"/&gt;
          &lt;cfhttpparam type="url" name="MessageHandle" value="#Arguments.messageId#"/&gt;
          &lt;cfhttpparam type="url" name="Signature" value="#tmp.signature#"/&gt;
          &lt;cfhttpparam type="url" name="SignatureVersion" value="1"/&gt;
          &lt;cfhttpparam type="url" name="Timestamp" value="#tmp.dateTimeString#"/&gt;
          &lt;cfhttpparam type="url" name="Version" value="#This.sqsVersion#"/&gt;
      &lt;/cfhttp&gt;
  
      &lt;cfdump var="#CFHTTP.FileContent#"&gt;&lt;cfabort&gt;
  
      &lt;cfif CFHTTP.ResponseHeader.Status_Code neq 200&gt;
          &lt;cfinvoke method="handleErrors"
              content="#CFHTTP.FileContent#"
          /&gt;
      &lt;cfelse&gt;
          &lt;cfreturn XmlParse(CFHTTP.FileContent).deleteMessageResponse.return.XmlText/&gt;
      &lt;/cfif&gt;
  &lt;/cffunction&gt;
  </code></pre>
  
  <p>All the details are being passed in correctly and the signature is also being generated successfully (verified through other AWS calls). The error message I get back from Amazon is:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;&lt;ErrorResponse xmlns="http://queue.amazonaws.com/doc/2008-01-01/"&gt;&lt;Error&gt;&lt;Type&gt;Sender&lt;/Type&gt;&lt;Code&gt;MissingParameter&lt;/Code&gt;&lt;Message&gt;The request must contain the parameter MessageHandle.&lt;/Message&gt;&lt;Detail/&gt;&lt;/Error&gt;&lt;RequestId&gt;1a144095-db82-59c1-9551-116614ba674d&lt;/RequestId&gt;&lt;/ErrorResponse&gt;
  </code></pre>
  
  <p>How do I correct this problem and correctly delete the message?</p>