Skip to content

Commit

Permalink
Created fifo-sqs-redrive.json
Browse files Browse the repository at this point in the history
  • Loading branch information
pputhran authored Jan 30, 2024
1 parent 91e0906 commit 8cf26f9
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions fifo-sqs-redrive/fifo-sqs-redrive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"title": "Redrive SQS FIFO Queue messages from DLQ",
"description": "The SAM template deploys Amazon SQS FIFO queues with DLQ and AWS Lambda functions to simulate the redrive capability of SQS FIFO queues from DLQ.",
"language": "Python",
"level": "200",
"framework": "SAM",
"introBox": {
"headline": "How it works",
"text": [
"This template creates two Amazon SQS queues - MyOriginalQueue.fifo and MyReProcessQueue.fifo along with DLQ MyDeadLetterQueue.fifo.",
"The template also creates two AWS Lambda functions MyOriginalQueueFunction and ReProcessQueueFunction to poll messages from MyOriginalQueue.fifo and MyReProcessQueue.fifo respectively through event source mapping.",
"The Lambda function MyOriginalQueueFunction raises exception to simulate message processing failure. Hence the message moves to DLQ MyDeadLetterQueue.fifo once the retry is exhausted.",
"We then redrive the message from DLQ MyDeadLetterQueue.fifo to MyReProcessQueue.fifo using AWS CLI command.",
"Message is successfully processed by ReProcessQueueFunction Lambda function."
]
},
"gitHub": {
"template": {
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/fifo-sqs-redrive",
"templateURL": "serverless-patterns/fifo-sqs-redrive",
"projectFolder": "fifo-sqs-redrive",
"templateFile": "template.yaml"
}
},
"resources": {
"bullets": [
{
"text": "Moving messages out of a dead-letter queue",
"link": "https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html#sqs-dead-letter-queues-redrive"
},
{
"text": "AWS CLI Command to start message redrive",
"link": "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sqs/start-message-move-task.html"
}
]
},
"deploy": {
"text": [
"sam deploy --guided"
]
},
"testing": {
"text": [
"See the GitHub repo for detailed testing instructions."
]
},
"cleanup": {
"text": [
"Delete the stack: <code>sam delete</code>."
]
},
"authors": [
{
"name": "Biswanath Mukherjee",
"image": "https://d1rwvjey2iif32.cloudfront.net",
"bio": "I am a Sr. Solutions Architect working at AWS India.",
"linkedin": "biswanathmukherjee"
}
],
"patternArch": {
"icon1": {
"x": 20,
"y": 30,
"service": "sqs",
"label": "Amazon SQS"
},
"icon2": {
"x": 50,
"y": 30,
"service": "lambda",
"label": "AWS Lambda"
},
"icon3": {
"x": 20,
"y": 70,
"service": "sqs",
"label": "Amazon SQS (DLQ)"
},
"line1": {
"from": "icon1",
"to": "icon2"
}
}
}

0 comments on commit 8cf26f9

Please sign in to comment.