Add Lambda-Runtime-Invocation-Id header support for cross-wiring protection
维护者通常 11 天内回复
@darklight3it 已经在做这个了。
开始于 2026年7月27日。
评估
这个 Issue 还没有评估数据。
描述
Summary
Lambda now sends a Lambda-Runtime-Invocation-Id header on /runtime/invocation/next responses. Runtimes should echo this header back on /runtime/invocation/{requestId}/response and /runtime/invocation/{requestId}/error to enable RAPID to detect and reject stale responses from timed-out invocations.
Problem
When an invoke times out, the runtime process continues running. If a new invoke arrives with the same requestId (customer-provided or retried by upstream), RAPID accepts it. The still-running old invocation eventually posts its response, and RAPID delivers the wrong response to the new invoke (cross-wiring).
This affects both On-Demand and Lambda Managed Instances (LMI), and Rust is a supported LMI runtime.
What needs to change
- Parse
Lambda-Runtime-Invocation-Idfrom the/nextresponse headers (optional — may be absent with older RAPID) - Store it alongside the invocation context
- Echo it as a request header on
/responseand/error - If the header is absent from
/next, don't send it back (backward compat)
Backward Compatibility
- Old RAPID (doesn't send the header) + New RIC (no header to echo) → no change ✅
- New RAPID (sends the header) + Old RIC (doesn't echo) → RAPID skips validation ✅
- New RAPID + New RIC → header echoed, RAPID validates match ✅
Reference Implementations
- 主要语言
- Rust
- 星标
- 3.6k
- 派生
- 398
- 平均合并
- 7 天 4 小时
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/aws-lambda-rust-runtime 的其他 Issue
-
[lambda_http] Fallible response body panics during buffered conversion instead of propagating the body error可能已有人在做 @IamPritamAcharya 于 34 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 74/100
aws/aws-lambda-rust-runtime#1165 ·
维护者通常 11 天内回复
-
SNS `Timestamp` doesn't round-trip: serialization drops `.000` subseconds, corrupting the signed string-to-sign可能已有人在做 @DebadityaHait 于 63 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
aws/aws-lambda-rust-runtime#1161 ·
维护者通常 11 天内回复
-
IoTCoreCustomAuthorizerResponse create invalid payalod可能已有人在做 @IamPritamAcharya 于 34 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 48/100
aws/aws-lambda-rust-runtime#1131 · 1 条评论 ·
维护者通常 11 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
aws/aws-lambda-rust-runtime#1128 · 1 条评论 · 1 个 reaction ·
维护者通常 11 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
aws/aws-lambda-rust-runtime#1120 · 2 个 reaction ·
维护者通常 11 天内回复
查看 aws/aws-lambda-rust-runtime 的全部 Issue
相似的 Issue
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
-
documentation
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
NuSkooler/enigma-bbs#907 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
bug pixi-build-r
难度 2/5 1-3 小时 新手友好度 70/100
prefix-dev/pixi#7229 ·
维护者通常 1 天内回复