title: How to access message attributes in SNS HTTPS subscription endpoint
body: <p>I'm setting up an integration test to determine if a program that publishes a message to SNS is working correctly. The published message includes a few critical message attributes that I need to check in order to determine correctness. </p>
  
  <p>So far, I have set up a simple HTTP server that acts as an SNS subscriber. The server correctly confirms its subscription and even receives messages from the topic, however I am at a loss as to how to access the attributes of these messages. </p>
  
  <p>It should be mentioned that I am using ngrok to expose my host to SNS. To accomplish this, I'm using the command:</p>
  
  <pre><code>ngrok http 8080
  </code></pre>
  
  <p>When I create the subscription, I have made sure to enable raw message delivery:</p>
  
  <pre><code>subOut, err := snsCli.Subscribe(&amp;sns.SubscribeInput{
      Endpoint: &amp;ngrokURL,
      Attributes: map[string]*string{
          "RawMessageDelivery": aws.String("True"),
      },
      Protocol: aws.String("https"),
      TopicArn: aws.String(topicArn),
  })
  </code></pre>
  
  <p>Note: I have also tried setting "RawMessageDelivery" to "true" instead of "True." This does not seem to elicit any changes.</p>
  
  <p>I have also tried using the <code>http</code> protocol instead of <code>https</code> but have achieved the same results.</p>
  
  <p>Below is the Notification post request received by the endpoint (I have substituted ARNs with asterisks):</p>
  
  <pre><code>POST / HTTP/1.1
  x-amz-sns-message-type: Notification
  x-amz-sns-message-id: c8bce1ed-3766-5a04-a9ad-b4afc662cc31
  x-amz-sns-topic-arn: ****
  x-amz-sns-subscription-arn: ****
  x-amz-sns-rawdelivery: true
  Content-Length: 1
  Content-Type: text/plain; charset=UTF-8
  Host: ****.ngrok.io
  User-Agent: Amazon Simple Notification Service Agent
  Accept-Encoding: gzip,deflate
  X-Forwarded-Proto: https
  X-Forwarded-For: 54.240.230.176
  </code></pre>
  
  <p>The messages published to SNS have only one byte in their body (a single space character) - I assume this is why the content length is 1.</p>
  
  <p>One of the message attributes is of binary format and contains characters that are not allowed in the body of an SNS message, otherwise I would simply place the encoded attributes in the message body.</p>
  
  <p>There do not appear to be any attributes available in the request, and I am totally stumped as to why. I would expect that they would be part of the raw request's body, but this does not seem to be the case. Any ideas?</p>
  
  <p>EDIT: I should probably add that I have added an SQS subscriber to this same topic and that the SQS subscriber receives message attributes as would be expected. </p>