Skip to content

Commit

Permalink
add dead letter queue for events
Browse files Browse the repository at this point in the history
  • Loading branch information
ebisbe committed Jul 12, 2024
1 parent 33ed590 commit 5878e45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/resources/streamPipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export const streamPipesResource: ServerlessExtended["resources"] = {
},
},

EventsDLQueue: {
Type: "AWS::SQS::Queue",
Properties: {},
},

PipeRole: {
Type: "AWS::IAM::Role",
Properties: {
Expand Down Expand Up @@ -146,6 +151,9 @@ export const streamPipesResource: ServerlessExtended["resources"] = {
dynamodb: "<dynamodb>",
}),
},
DeadLetterConfig: {
Arn: getAttribute("EventsDLQueue", "Arn"),
},
},
],
},
Expand Down
2 changes: 2 additions & 0 deletions src/types/extendedSlsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
IAMRoleProps,
LogsLogGroupProps,
PipesPipeProps,
SQSQueueProps,
} from "@awboost/cfntypes";
import type { IamRoleStatement, Serverless } from "serverless/aws";
import type StepFunctions from "serverless-step-functions";
Expand All @@ -22,6 +23,7 @@ type SlsResource =
| Resource<"AWS::Events::EventBus", EventsEventBusProps>
| Resource<"AWS::IAM::Role", IAMRoleProps>
| Resource<"AWS::Logs::LogGroup", LogsLogGroupProps>
| Resource<"AWS::SQS::Queue", SQSQueueProps>
| Resource<"AWS::Events::Rule", EventsRuleProps>
| Resource<"AWS::Pipes::Pipe", PipesPipeProps>;

Expand Down

0 comments on commit 5878e45

Please sign in to comment.