AWS lambda: Clarify MicroVM max duration and terminate hook semantics
Summary
Reworded the --maximum-duration-in-seconds parameter to describe total lifespan (running + suspended), and clarified that the /terminate hook runs only on final termination, not on suspend.
Security assessment
The change is a lifecycle/behavior clarification about duration limits and cleanup hooks. It has no authentication, encryption, or exposure implications; it is purely operational documentation.
Evidence
+`/aws/lambda-microvms/runtime/v1/terminate` | Before MicroVM terminates | Flush data, notify external systems, clean up. This hook runs only on final termination, not when suspending. Use the `/suspend` hook for pre-suspend cleanup.
Diff
diff --git a/lambda/latest/dg/microvms-launching.md b/lambda/latest/dg/microvms-launching.md index 130bd19..839f174 100644 --- a//lambda/latest/dg/microvms-launching.md +++ b//lambda/latest/dg/microvms-launching.md @@ -37 +37 @@ Parameter | Description -`--maximum-duration-in-seconds` | The maximum duration the MicroVM can remain in a running or suspended state before Lambda terminates it. Range: 1–28,800 seconds (8 hours). +`--maximum-duration-in-seconds` | The maximum total lifespan of the MicroVM, including both running and suspended time. Lambda terminates the MicroVM when this duration is exceeded. Range: 1–28,800 seconds (8 hours). @@ -216 +216 @@ Hook | When invoked | Purpose -`/aws/lambda-microvms/runtime/v1/terminate` | Before MicroVM terminates | Flush data, notify external systems, clean up. +`/aws/lambda-microvms/runtime/v1/terminate` | Before MicroVM terminates | Flush data, notify external systems, clean up. This hook runs only on final termination, not when suspending. Use the `/suspend` hook for pre-suspend cleanup. @@ -391 +391 @@ Terminate a MicroVM when it is no longer needed. Termination releases all comput -Before releasing resources, Lambda calls your `/terminate` hook. Use it to flush pending data or notify external systems. +Before releasing resources, Lambda calls your `/terminate` hook. Use it to flush pending data or notify external systems. The `/terminate` hook runs only on final termination – it does not run when a MicroVM is suspended.