Ch. 15 · AWS

AWS SQS Delivery and Visibility Timeouts

AWS SQS Delivery and Visibility Timeouts. Learn the reasoning, a practical example, common mistakes and an interview exercise.

~2 min readintermediateupdated Oct 3, 2026

Queue consumers need to handle redelivery. Visibility timeout temporarily hides a received message while work occurs; deleting acknowledges successful processing.

Before you start

You should understand regions, identity permissions and the responsibilities of the AWS service being discussed. Sketch request flow and failure boundaries before choosing configuration. Work through these scenarios as designs; provisioning real resources can introduce charges and requires an account-specific permissions and capacity plan.

The practical goal is to reason through this situation: A worker extends visibility for legitimate long work and deletes only after durable success. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.

Step-by-step walkthrough

Step 1: Treat receipt as temporary ownership

Visibility hides a message while a worker processes it.

Step 2: Acknowledge durable success

Delete only after the logical work is safely recorded.

Step 3: Handle long work and repeats

Renew visibility where supported and preserve idempotency.

Worked scenario

A worker extends visibility for legitimate long work and deletes only after durable success.

A worker takes longer than its visibility timeout, so another worker can receive the same message. Both may overlap even though only one initial receipt was expected. Deleting before processing risks loss, while deleting after durable idempotent completion allows safe redelivery after crashes.

Common mistake

Deleting before processing can lose work; exceeding visibility can permit overlap.

Verify the behavior

Test timeout overlap, worker crash and repeated delivery; count business effects.

Interview exercise

Process a slow job safely.

Answer and reasoning

Bound work, renew visibility where supported and make the business side effect idempotent across repeated deliveries.

Continue learning

Compare the scenario with the AWS interview questions and test your understanding with the AWS MCQs. For terminology and implementation details, consult the reference material.

More in AWS

read ✓AWS · hard

AWS DynamoDB Query vs Scan

Read by key with Query, avoid full-table Scans, and add indexes to serve the access patterns you actually have.

~2 min readread →
read ✓AWS · mid

AWS ECS vs EKS

Compare ECS and EKS for running containers on AWS, and choose by control, portability and team capability.

~2 min readread →
esc