When AWS Lambda consumes messages from an Amazon SQS queue, failed messages can be delivered again after the queue’s visibility timeout. Configure a redrive policy to move repeatedly failing messages to a dead-letter queue (DLQ), and enable partial batch responses when you want successful records in a batch to avoid unnecessary retries. Make processing idempotent: a retry can repeat work that already caused a side effect.
How retries work with an SQS-triggered Lambda
With an SQS event source mapping, Lambda polls the queue and invokes your function with a batch of messages. When a message is received, SQS hides it for the visibility timeout. If processing fails and the message is not deleted, it can become visible and be received again. The queue’s visibility timeout and redrive policy are central to redelivery timing and the destination for messages that exceed the configured receive threshold. Lambda also applies backoff behavior, but this integration is not governed by Lambda’s native asynchronous-invocation retry schedule. AWS Lambda: Creating and configuring an Amazon SQS event source mapping.
For comparison, Lambda’s separate asynchronous invocation model uses a Lambda-managed event queue. By default, function errors receive two further attempts: one after one minute and another after two minutes. Throttling and system errors follow different defaults: Lambda retries for up to six hours, with intervals that increase from one second to as much as five minutes. Those are defaults for Lambda asynchronous invocation, not SQS maxReceiveCount settings. See How Lambda handles errors and retries with asynchronous invocation and Understanding retry behavior in Lambda.
For direct synchronous Lambda invocations, Lambda does not automatically retry function-code errors; the caller or application decides whether and how to try again. Always identify the trigger before choosing retry controls.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
What should the SQS visibility timeout be for Lambda?
AWS recommends setting the source queue’s visibility timeout to at least six times the Lambda function timeout. If you configure a batching window, add MaximumBatchingWindowInSeconds to that calculation. The function timeout must not exceed the queue visibility timeout. This gives the integration room to handle throttling and batch processing. See AWS’s event source mapping configuration guidance.
For example, if the function timeout is 30 seconds and the batching window is 10 seconds, the recommendation works out to at least 190 seconds: (6 × 30) + 10. This is an application of AWS’s recommendation, not a universal value; use your configured function timeout and batching window.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
How to configure retries and a DLQ
- Set a visibility timeout that fits processing. Apply the six-times-function-timeout guidance, adding the batching window if configured, and ensure the function timeout is no greater than the queue visibility timeout.
- Set a redrive policy on the source queue. Specify a DLQ and a deliberate
maxReceiveCount. For Lambda SQS event sources, AWS recommends a value of at least 5 so messages have several attempts before being moved. This is a recommendation for this integration, not a universal setting for all SQS consumers. See the Lambda event source mapping guidance. - Decide how batch failures should behave. If any record fails, the default behavior can make every message in the batch eligible for another delivery, including records already processed successfully. Enable
ReportBatchItemFailureson the event source mapping and return the identifiers of failed records to limit retries to those records. If your handler throws an exception, Lambda treats the entire batch as failed. See Handling errors for an SQS event source in Lambda. - Alert on DLQ messages. A DLQ makes repeated failures available for inspection; configure monitoring so operators know when messages arrive there.
How partial batch failures work
Partial batch responses are useful when records in one invocation can succeed or fail independently. Configure the event source mapping to report batch item failures, then have the function return only the failed message identifiers. Successfully processed records can then avoid the retry caused by another record’s failure. AWS describes this feature as a way to make only failed messages visible again after a batch failure; see the SQS event source error-handling guide.
For FIFO queues, preserve ordering when using partial batch responses: stop processing after the first failure and report that record along with any later, unprocessed records. Moving a failed message to a DLQ can itself break the exact order of messages or operations, so use a FIFO DLQ only if the workflow can tolerate that consequence. The Amazon SQS Developer Guide warns against using a DLQ with a FIFO queue when exact order must not be broken.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Why Lambda may process the same SQS message again
Redelivery is part of retry behavior, not proof that a message will execute only once. A message may be received again when processing fails, when the visibility timeout expires before it is deleted, or when an invocation-level failure causes the batch to be retried. A duplicate can repeat an external side effect unless the application protects against it.
Make operations idempotent: use a durable operation key, such as a payment or business-event identifier, to detect that the work has already been applied before applying it again. Do not assume that one SQS receive corresponds to one execution or one side effect. AWS discusses retry handling in Understanding retry behavior in Lambda.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
What happens to messages in a DLQ?
A DLQ isolates messages that have not been processed successfully after the configured receive threshold. Operators can inspect message contents and related exception logs, diagnose the problem, and redrive messages after addressing its cause. Retention behavior differs by queue type:
- Standard queue: The original enqueue timestamp is preserved when SQS moves a message to a DLQ, and expiry remains based on that original timestamp. AWS recommends setting the DLQ retention period longer than the source queue’s retention period.
- FIFO queue: The enqueue timestamp resets when a message moves to the DLQ. A DLQ may also interrupt required message or operation ordering.
See Using dead-letter queues in Amazon SQS for the queue-specific behavior.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Delay queues and visibility timeouts solve different problems
A delay queue postpones the first delivery of a newly sent message. Its configured delay can be up to 15 minutes. A visibility timeout begins after a consumer receives a message: it temporarily hides the message while processing occurs, and an undeleted message can become visible again when the timeout expires. A delay queue is therefore not a general-purpose exponential-backoff scheduler. See Amazon SQS delay queues.
For an individual message delay, SQS message timers can set DelaySeconds. For advanced scheduling beyond SQS’s 15-minute queue-delay and message-timer window, AWS recommends EventBridge Scheduler.
Choosing between SQS retries and Lambda asynchronous retries
| Decision point | SQS event source mapping | Lambda asynchronous invocation |
|---|---|---|
| Retry owner | Source queue and Lambda’s SQS event source mapping | Lambda-managed asynchronous event queue |
| Retry timing controls | Queue visibility timeout and redrive policy; Lambda also applies backoff | Lambda’s asynchronous retry behavior |
| Failure unit | Messages delivered in a batch; partial batch responses can identify failed records | Asynchronous invocation event |
| Terminal failure handling | SQS redrive policy and DLQ | Lambda DLQ or on-failure destination, depending on configuration |
| Ordering concerns | FIFO ordering requires care with partial failures and DLQs | Not governed by an SQS FIFO queue |
| Duplicate side effects | Use idempotent message processing | Use idempotent event processing |
For the Lambda asynchronous defaults, see Lambda asynchronous error handling. For SQS event source configuration, see Creating and configuring an Amazon SQS event source mapping.
Related SQS configuration limits and defaults
Amazon SQS queue configuration documentation lists message retention up to 14 days, with a four-day default, and visibility timeout up to 12 hours, with a 30-second default. These are service configuration values, not recommended retry settings; choose values for the queue and workload you are configuring. See Configuring queue parameters using the Amazon SQS console.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

