Skip to content

Commit

Permalink
Merge pull request #79 from Sage-Bionetworks/etl-538
Browse files Browse the repository at this point in the history
[ETL-538] Add dead letter queue for our SQS queue
  • Loading branch information
philerooski authored Sep 26, 2023
2 parents ec87872 + 2658f3c commit 762add7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions templates/sqs-queue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Resources:
QueueName: !Sub '${AWS::StackName}-Queue'
ReceiveMessageWaitTimeSeconds: !Ref ReceiveMessageWaitTimeSeconds
VisibilityTimeout: !Ref VisibilityTimeout
RedrivePolicy:
deadLetterTargetArn: !GetAtt DeadLetterQueue.Arn
maxReceiveCount: 3

PrimaryQueuePolicy:
Type: AWS::SQS::QueuePolicy
Expand All @@ -57,6 +60,17 @@ Resources:
Queues:
- !Ref PrimaryQueue

DeadLetterQueue:
Type: AWS::SQS::Queue
Properties:
DelaySeconds: 0
MessageRetentionPeriod: 1209600
QueueName: !Sub '${AWS::StackName}-DeadLetterQueue'
ReceiveMessageWaitTimeSeconds: !Ref ReceiveMessageWaitTimeSeconds
RedriveAllowPolicy:
redrivePermission: allowAll
VisibilityTimeout: !Ref VisibilityTimeout

Outputs:

PrimaryQueueArn:
Expand Down

0 comments on commit 762add7

Please sign in to comment.