0
0
AWScloud~20 mins

Dead letter queues in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Dead Letter Queue Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Purpose of Dead Letter Queues in AWS

What is the primary purpose of a Dead Letter Queue (DLQ) in AWS messaging services like SQS or SNS?

ATo store messages that failed processing after multiple retries for later analysis or reprocessing.
BTo permanently delete messages that cause errors during processing.
CTo automatically retry messages indefinitely until they succeed.
DTo encrypt messages before sending them to the main queue.
Attempts:
2 left
💡 Hint

Think about what happens to messages that cannot be processed successfully.

Configuration
intermediate
2:00remaining
Configuring a Dead Letter Queue for an SQS Queue

You want to configure an SQS queue to send failed messages to a Dead Letter Queue after 5 failed processing attempts. Which configuration setting must you set on the main queue?

AEnable server-side encryption on the main queue.
BSet the VisibilityTimeout attribute to 5 seconds on the main queue.
CSet the DelaySeconds attribute to 5 on the DLQ.
DSet the RedrivePolicy attribute with maxReceiveCount set to 5 and specify the ARN of the DLQ.
Attempts:
2 left
💡 Hint

Look for the setting that controls how many times a message can be received before moving to DLQ.

Architecture
advanced
3:00remaining
Designing a Reliable Message Processing System with DLQ

You are designing a system that processes messages from an SQS queue. To ensure no message is lost and failures are handled gracefully, which architecture pattern involving DLQs is best?

AUse a main SQS queue with a DLQ configured; process messages and on failure, messages move to DLQ for manual or automated reprocessing.
BUse only a DLQ without a main queue to store all messages directly.
CProcess messages directly from the DLQ and discard messages from the main queue.
DUse multiple main queues without DLQs and rely on message visibility timeout for retries.
Attempts:
2 left
💡 Hint

Consider how to separate failed messages from successfully processed ones.

service_behavior
advanced
2:00remaining
Behavior of Messages in DLQ After Reaching maxReceiveCount

What happens to a message in an SQS main queue when it reaches the maxReceiveCount specified in the RedrivePolicy?

AThe message is deleted permanently from the main queue without moving to any other queue.
BThe message is moved automatically to the configured Dead Letter Queue and removed from the main queue.
CThe message is retried indefinitely in the main queue without moving to DLQ.
DThe message is archived in the main queue but remains visible for processing.
Attempts:
2 left
💡 Hint

Think about what the RedrivePolicy controls regarding message retries and failures.

security
expert
3:00remaining
Securing Access to Dead Letter Queues in AWS

You want to ensure that only specific AWS Lambda functions can read messages from your SQS Dead Letter Queue. Which is the best way to enforce this access control?

AUse a public access policy on the DLQ to allow all AWS services to read messages.
BSet the DLQ's RedrivePolicy to restrict access to Lambda functions.
CAttach an IAM policy to the Lambda functions allowing sqs:ReceiveMessage and sqs:DeleteMessage on the DLQ ARN, and set a resource-based policy on the DLQ to allow only those Lambda roles.
DEnable server-side encryption on the DLQ and rely on encryption keys to restrict access.
Attempts:
2 left
💡 Hint

Consider both IAM roles and resource policies for fine-grained access control.