{
  "Resources": {
    "MyTopic86869434": {
      "Type": "AWS::SNS::Topic"
    },
    "MyTopicMyQueueSubscription3245B11E": {
      "Type": "AWS::SNS::Subscription",
      "Properties": {
        "Endpoint": {
          "Fn::GetAtt": [
            "MyQueueE6CA6235",
            "Arn"
          ]
        },
        "Protocol": "sqs",
        "TopicArn": {
          "Ref": "MyTopic86869434"
        }
      }
    },
    "MyTopicPolicy12A5EC17": {
      "Type": "AWS::SNS::TopicPolicy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Sid": "0",
              "Action": "sns:Publish",
              "Effect": "Allow",
              "Principal": {
                "Service": "events.amazonaws.com"
              },
              "Resource": {
                "Ref": "MyTopic86869434"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Topics": [
          {
            "Ref": "MyTopic86869434"
          }
        ]
      }
    },
    "EveryMinute2BBCEA8F": {
      "Type": "AWS::Events::Rule",
      "Properties": {
        "ScheduleExpression": "rate(1 minute)",
        "State": "ENABLED",
        "Targets": [
          {
            "Arn": {
              "Ref": "MyTopic86869434"
            },
            "Id": "MyTopic"
          }
        ]
      }
    },
    "MyQueueE6CA6235": {
      "Type": "AWS::SQS::Queue"
    },
    "MyQueuePolicy6BBEDDAC": {
      "Type": "AWS::SQS::QueuePolicy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "sqs:SendMessage",
              "Condition": {
                "ArnEquals": {
                  "aws:SourceArn": {
                    "Ref": "MyTopic86869434"
                  }
                }
              },
              "Effect": "Allow",
              "Principal": {
                "Service": "sns.amazonaws.com"
              },
              "Resource": {
                "Fn::GetAtt": [
                  "MyQueueE6CA6235",
                  "Arn"
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Queues": [
          {
            "Ref": "MyQueueE6CA6235"
          }
        ]
      }
    }
  }
}