You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MicroVM session: a launch retried across a deploy can record the wrong resume mode #815
A session launch step that is retried after a deploy can record a resume mode that does not match the MicroVM it launched.
Details
The launch step computes the run hook payload and the resume mode from the current config.
A failed first attempt, for example a throttled RunMicrovm, makes the step retry, possibly in a later invocation.
A deploy between the attempts can change autoSuspendOnIdle or idlePolicy.
Both attempts send the same client token. A review probe measured the payloads: the first attempt sent autoSuspendIdleSeconds: 60, the retry sent no idle time, and the step recorded "resumeBeforeDelivery": false.
Suppose the first attempt created the MicroVM and only its response was lost. Then RunMicrovm either returns that MicroVM, whose worker suspends after 60 seconds, or rejects the changed parameters.
In the first case, the session skips the state check for a MicroVM that suspends. The next job after a suspend then gets HTTP 502 from the suspended endpoint, and fails with MicrovmDeliveryError after both retry tiers.
Not verified: how RunMicrovm treats a reused client token with different parameters.
The code before the resumeBeforeDelivery field had the same gap. So this is not a regression.
Proposed fix
Decide the launch inputs once, before the first attempt. For example, a step before the launch step records the run hook payload, the idle policy, and the resume mode. The launch step and its retries then read them from that step's result, not from the current config. The JavaScript and Python SDKs share the launch checkpoint format, so both should make the same change.
Closing with a guideline instead of code. The MicroVM best-practices docs now cover this case (JS #1076/#1077, Python #825/#826).
Lambda pins an execution that starts through a published version or an alias to that version. Every retry and replay then runs the same code and environment variables.
So a launch retry can see different launch settings only under $LATEST, or when a setting is read outside a step from a source that can change.
The docs say to invoke through a version or an alias, and to read such a setting inside a step. They also state the consequence under $LATEST: the launch can fail with MicrovmLaunchError, and a MicroVM from an earlier attempt can run until its maximum duration.
Recording the launch inputs in a step would change the checkpoint format in every SDK. The guideline covers the same case without it.
Activity
ParidelPooya commentedon Oct 23, 2026
JavaScript tracking issue: aws/aws-durable-execution-sdk-js#1066
ParidelPooya commentedon Oct 24, 2026
Closing with a guideline instead of code. The MicroVM best-practices docs now cover this case (JS #1076/#1077, Python #825/#826).
$LATEST, or when a setting is read outside a step from a source that can change.$LATEST: the launch can fail withMicrovmLaunchError, and a MicroVM from an earlier attempt can run until its maximum duration.Recording the launch inputs in a step would change the checkpoint format in every SDK. The guideline covers the same case without it.