🔧 ProgrammierungThree checks that were green for the wrong reason(16.09.2026 um 06:43 Uhr)
🔧 ProgrammierungTreat the Grader as Code, Not a Hidden Prompt(16.09.2026 um 06:49 Uhr)
🔧 Programmierung[Event Sourcing] Trying out Sekiban DCB: Implementation(16.09.2026 um 06:50 Uhr)
🔧 AI Nachrichten An LLM Is Not Your Backend — Here's What I Learned(16.09.2026 um 06:53 Uhr)
🔧 ProgrammierungA week of NVIDIA news is 5,718 articles. My filter kept 161(16.09.2026 um 06:55 Uhr)
🔧 ProgrammierungThree checks that were green for the wrong reason(16.09.2026 um 06:43 Uhr)
🔧 ProgrammierungTreat the Grader as Code, Not a Hidden Prompt(16.09.2026 um 06:49 Uhr)
🔧 Programmierung[Event Sourcing] Trying out Sekiban DCB: Implementation(16.09.2026 um 06:50 Uhr)
🔧 AI Nachrichten An LLM Is Not Your Backend — Here's What I Learned(16.09.2026 um 06:53 Uhr)
🔧 ProgrammierungA week of NVIDIA news is 5,718 articles. My filter kept 161(16.09.2026 um 06:55 Uhr)

🔧 Programmierung 🕛 vor 3 Monaten 6 Min Lesezeit
0

Triggering Lambda Durable Functions from SQS

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Lambda durable functions, introduced in re:Invent 2025, are a great fit for long-running workflows that need to wait for external events, callbacks, or simply pause between steps. A single durable execution can run up to 1 year, which opens up a lot of use cases that previously required Step Functions or custom orchestration.



Even though the execution can span up to 1 year, it is better to be clear about what "1 year" actually refers to. A durable execution is not a single Lambda invocation that stays alive for a year. A durable execution can consist of multiple separate invocations. Between those invocations, the execution can be moved to wait state or go to sleep and you will not be charged for that. Every one of those individual invocations still has to finish within the standard 15 minute Lambda function timeout. And, the total duration of those individual invocations and the wait time must be maximum of 1 year. From the caller's perspective the execution can span hours, days, or up to a year, even though a single invocation must run for maximum 15 minutes.






  1. The ESM invokes the intermediary Lambda synchronously.

  2. The intermediary Lambda invokes the durable function asynchronously (InvocationType=Event) using the Lambda Invoke API.

  3. The intermediary Lambda returns success immediately, and the ESM is happy.

  4. And, the durable function then runs on its own, independent of the ESM, for as long as it needs (up to 1 year).



The intermediary function is an essential piece here, but now you own and maintain a Lambda function whose only job is to forward an event.






A cleaner approach: EventBridge Pipes



EventBridge Pipes can be the bridge between an event source and a Lambda target, and the target invocation can be configured as fire-and-forget (asynchronous). That is exactly the behavior we need. The source side polling is decoupled from the durable execution, and there is no intermediary Lambda to write or maintain.



.



Deploy it to your own AWS account using AWS CDK and Python:




  • Clone the repository and create a virtual environment:




CODE
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt







  • Deploy the stack:




CODE
cdk deploy







  • Send a test message to the QueueUrl output from the stack:




CODE
aws sqs send-message \
--queue-url <QueueUrl> \
--message-body '{"hello": "durable"}'







  • Open the durable function in the Lambda console using the LambdaFunctionName stack output and watch the execution. You will see the first print_event_before_wait log entry almost immediately, then the wait continues for 30 minutes, then the print_event_after_wait log entry. The execution completes successfully even though it took twice as long as a standard ESM invoked Lambda would allow.




Please note: In both the approaches the Pipe or intermediary function succeeds when the async invoke is accepted, not when the durable execution succeeds. If the durable function fails internally (an exception in a step or a callback times out etc), that failure is visible inside the durable execution history, but the SQS source has already considered the message processing is done. It is advised to build your error handling inside the durable function itself for such failures. Source queue level error handling will manage anything that failed to trigger the Pipe or intermediary function.







Summary



Durable functions are a new way of building long-running, multi-step workflows on Lambda, but the 15 minute ceiling that appears the moment you put an event source mapping in front of them can be a real constraint. The workaround is to use an intermediary Lambda that asynchronously invokes the durable function, but you have to own and manage it.



EventBridge Pipes does the same job natively. By configuring the Pipe target with FIRE_AND_FORGET, you get the same decoupling between the synchronous poller of ESM and the long-running durable execution, without owning or managing a Lambda function.



If you are reaching for durable functions to handle SQS messages with steps, waits, or callbacks that exceed 15 minutes, using Pipes can be a better option than using an intermediary function.






Resources




  1. Lambda durable functions overview:

  2. Amazon EventBridge Pipes targets:

    Twitter/X:

    Personal blog: https://pubudu.dev

    Vollständiger Original-Artikel
    Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
    ↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Mega-Upate für Google Pixel: Android 17 QPR1 bringt euch 25+ Neuerungen und 20 Fixes
1 Quelle
Three checks that were green for the wrong reason
1 Quelle
The Realpolitik of Tech: Navigating the Machiavellian Reality of People Management
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Triggering Lambda Durable Functions from SQS

Thematisch verwandte Begriffe: Triggering, Lambda, Durable, Functions · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...