Skip to content

Instantly share code, notes, and snippets.

@tkeeber
Last active December 11, 2018 15:32
Show Gist options
  • Save tkeeber/73ba5dbed325771717c310cb58e2b2ea to your computer and use it in GitHub Desktop.
Save tkeeber/73ba5dbed325771717c310cb58e2b2ea to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: AWS SNS topic to SQS Queue
Resources:
StatsTopic:
Type: AWS::SNS::Topic
StatsPersistQueue:
Type: AWS::SQS::Queue
Properties:
VisibilityTimeout: 60 # 1 minute
MessageRetentionPeriod: 300 # 5 mins.
StatsProcessQueue:
Type: AWS::SQS::Queue
Properties:
VisibilityTimeout: 60 # 1 minute
MessageRetentionPeriod: 300 # 5 mins.
StatsPersistQueueSubscription:
Type: AWS::SNS::Subscription
Properties:
TopicArn: !Ref StatsTopic
Endpoint: !GetAtt StatsPersistQueue.Arn
Protocol: sqs
StatsProcessQueueSubscription:
Type: AWS::SNS::Subscription
Properties:
TopicArn: !Ref StatsTopic
Endpoint: !GetAtt StatsProcessQueue.Arn
Protocol: sqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment