AWS Security ChangesHomeSearch

AWS lambda: Fix SnapStart runtime hook doc wording and error header format

Service: lambda · 2026-09-27 · Documentation low

File: lambda/latest/dg/snapstart-runtime-hooks-custom.md

Summary

Corrects 'pseudo-code samples' to 'pseudo-code sample', fixes the Lambda-Runtime-Function-Error-Type header placeholder from '<Category>.<Reason>' to '<Category.Reason>', and adds a missing 'GET /runtime/invocation/next' line to a pseudo-code sample.

Security assessment

These are editorial corrections to SnapStart runtime hook documentation (grammar, placeholder formatting, and a missing pseudo-code line). No security feature, vulnerability, or credential/authorization behavior is described or changed.

Evidence

                    SET header  Lambda-Runtime-Function-Error-Type  TO  <Category.Reason>

Diff

diff --git a/lambda/latest/dg/snapstart-runtime-hooks-custom.md b/lambda/latest/dg/snapstart-runtime-hooks-custom.md
index 49c91da79..4dfc0dbd9 100644
--- a//lambda/latest/dg/snapstart-runtime-hooks-custom.md
+++ b//lambda/latest/dg/snapstart-runtime-hooks-custom.md
@@ -49 +49 @@ To use SnapStart with your container image functions, follow the steps below:
-  1. **Run before-snapshot hooks and trigger the snapshotting process:** As the last step of your function's initialization code, execute the before-snapshot hooks if required and trigger the snapshotting process. Perform these steps only if SnapStart is enabled, by checking that the value of the `AWS_LAMBDA_INITIALIZATION_TYPE` environment variable is set to `snap-start`. Run your registered before-snapshot hooks, then call `GET /runtime/restore/next` to trigger the snapshotting process. If a before-snapshot hook throws or returns an error, the runtime posts the error to the `/runtime/init/error` endpoint. See the pseudo-code samples below:
+  1. **Run before-snapshot hooks and trigger the snapshotting process:** As the last step of your function's initialization code, execute the before-snapshot hooks if required and trigger the snapshotting process. Perform these steps only if SnapStart is enabled, by checking that the value of the `AWS_LAMBDA_INITIALIZATION_TYPE` environment variable is set to `snap-start`. Run your registered before-snapshot hooks, then call `GET /runtime/restore/next` to trigger the snapshotting process. If a before-snapshot hook throws or returns an error, the runtime posts the error to the `/runtime/init/error` endpoint. See the pseudo-code sample below:
@@ -61 +61 @@ To use SnapStart with your container image functions, follow the steps below:
-                    SET header  Lambda-Runtime-Function-Error-Type  TO  <Category>.<Reason>
+                    SET header  Lambda-Runtime-Function-Error-Type  TO  <Category.Reason>
@@ -75 +75 @@ The init phase and before-snapshot hooks share a combined timeout of `max(functi
-  2. **Run after-restore hooks, then enter the invoke loop.** When `GET /runtime/restore/next` returns 200, your runtime must execute any registered after-restore hooks before proceeding to the invoke loop. If an after-restore hook fails, report the error to `/runtime/restore/error`. After the after-restore hooks complete, enter the standard invoke loop by calling `GET /runtime/invocation/next`. From this point on, the behavior is identical to a function that doesn't use SnapStart. See the pseudo-code samples below:
+  2. **Run after-restore hooks, then enter the invoke loop.** When `GET /runtime/restore/next` returns 200, your runtime must execute any registered after-restore hooks before proceeding to the invoke loop. If an after-restore hook fails, report the error to `/runtime/restore/error`. After the after-restore hooks complete, enter the standard invoke loop by calling `GET /runtime/invocation/next`. From this point on, the behavior is identical to a function that doesn't use SnapStart. See the pseudo-code sample below:
@@ -84 +84 @@ The init phase and before-snapshot hooks share a combined timeout of `max(functi
-                SET header  Lambda-Runtime-Function-Error-Type  TO  <Category>.<Reason>
+                SET header  Lambda-Runtime-Function-Error-Type  TO  <Category.Reason>
@@ -87,0 +88 @@ The init phase and before-snapshot hooks share a combined timeout of `max(functi
+           GET /runtime/invocation/next