Skip to content

Commit

Permalink
Created sqs queues and eventbridge rules for event delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocco Zanni committed Nov 2, 2023
1 parent deee963 commit 79788e2
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
21 changes: 20 additions & 1 deletion analytics/deployment/resources/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,23 @@ Resources:
MainEventBus:
Type: AWS::Events::EventBus
Properties:
Name: ${self:custom.appPrefix}-${opt:stage}-main
Name: ${self:custom.appPrefix}-${opt:stage}-main
SendToSQSArchiveEventRule:
Type: AWS::Events::Rule
Properties:
EventBusName: !Ref MainEventBus
EventPattern:
source:
- monitor
State: ENABLED
Targets:
- Id: send-to-sqs-archive-raw
Arn:
Fn::GetAtt:
- ArchiveRawQueue
- Arn
- Id: send-to-sqs-archive-database
Arn:
Fn::GetAtt:
- ArchiveDatabaseQueue
- Arn
27 changes: 27 additions & 0 deletions analytics/deployment/resources/sqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ Resources:
Properties:
QueueName: ${self:custom.appPrefix}-${opt:stage}-blackhole
MessageRetentionPeriod: 60
ArchiveDeadletterQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: ${self:custom.appPrefix}-${opt:stage}-archive-deadletter
MessageRetentionPeriod: 604800
ArchiveRawQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: ${self:custom.appPrefix}-${opt:stage}-archive-raw
VisibilityTimeout: 60
RedrivePolicy:
maxReceiveCount: 5
deadLetterTargetArn:
Fn::GetAtt:
- ArchiveDeadletterQueue
- Arn
ArchiveDatabaseQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: ${self:custom.appPrefix}-${opt:stage}-archive-database
VisibilityTimeout: 60
RedrivePolicy:
maxReceiveCount: 5
deadLetterTargetArn:
Fn::GetAtt:
- ArchiveDeadletterQueue
- Arn
AggregateQueue:
Type: AWS::SQS::Queue
Properties:
Expand Down

0 comments on commit 79788e2

Please sign in to comment.