title: How to write the cloudformation subscription between Sns event topic and sqs event queue
body: <p>I have A service where we have sns topics and in B service sqs queue event.</p>
  <p>from B service cloud formation I need to write the cloud formation YAML file to subscription between SNS event topic and SNS event queue.</p>
  <p>sns topic name : <strong>sns-event-topic</strong></p>
  <p>subscribed to queue name: <strong>abcd-events</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Resources:
  
  AbcdEventQueue:
      Type: "AWS::SQS::Queue"
      Properties:
        QueueName: "abcd-events"
  AbcdEventQueuePolicy:
    Type: "AWS::SQS::QueuePolicy"
      Properties:
        Queues:
          - Ref: "AbcdEventQueue"
        PolicyDocument:
          Statement:
            - Effect: "Allow"
              Principal:
                AWS: '*'
              Action:
                - sqs:SendMessage
                - sqs:ReceiveMessage
                - sqs:DeleteMessage
                - sqs:GetQueueUrl
                - sqs:GetQueueAttributes
                - sqs:ListQueueTags
                - sqs:ChangeMessageVisibility
              Resource:
                - !GetAtt AbcdEventQueue.Arn</code></pre>
  </div>
  </div>
  </p>