Title: feat: Add Lambda-Runtime-Invocation-Id support for cross-wiring protection by vip-amzn · Pull Request #214 · aws/aws-lambda-python-runtime-interface-client · GitHub
Open Graph Title: feat: Add Lambda-Runtime-Invocation-Id support for cross-wiring protection by vip-amzn · Pull Request #214 · aws/aws-lambda-python-runtime-interface-client
X Title: feat: Add Lambda-Runtime-Invocation-Id support for cross-wiring protection by vip-amzn · Pull Request #214 · aws/aws-lambda-python-runtime-interface-client
Description: Summary Add Lambda-Runtime-Invocation-Id header support for cross-wiring protection. The RIC now echoes the invocation ID received from RAPID on /next back on /response and /error, enabling RAPID to detect and reject stale responses from timed-out invocations. Problem On Lambda Managed Instances (LMI) and On-Demand (OD), when an invoke times out, the runtime process continues running in the background. If a new invoke arrives with the same requestId, RAPID accepts it. The still-running old invocation eventually posts its response, and RAPID matches it to the new invoke — delivering the wrong response (cross-wiring). Solution RAPID sends a unique per-invoke nonce via Lambda-Runtime-Invocation-Id header on /next. The runtime echoes it back on /response and /error. RAPID validates the match before accepting the response. Changes runtime_client.cpp: Parse Lambda-Runtime-Invocation-Id from /next response, pass to post_success/post_failure via z format (accepts None → nullptr) lambda_runtime_client.py: Thread invocation_id through to native client bootstrap.py: Pass invocation_id from event request to response/error posting deps/patches/aws-lambda-cpp-add-invocation-id.patch: Patch aws-lambda-cpp to support invocation_id in get_next/do_post deps/patches/aws-lambda-cpp-musl-no-execinfo.patch: Extracted Alpine/musl fix from d3e9632 into a proper patch file so update_deps.sh can reproduce the tarball from scratch (previously baked directly into the tarball without a patch — see d3e9632) Unit tests: 6 new invocation-id specific tests + fix existing assertions for the new parameter Backward Compatibility Fully backward compatible in both directions: If RAPID doesn't send the header → RIC doesn't see it → doesn't echo → no behavior change If RIC doesn't echo it (old version) → RAPID skips validation → no behavior change Testing 95 unit tests pass (includes 6 new invocation-id tests) E2E tested with updated RIE binary (validates invocation-id echo) and stock RIE (backward compat verified) Alpine 3.19 Docker build verified locally (musl/execinfo conditional compilation works)
Open Graph Description: Summary Add Lambda-Runtime-Invocation-Id header support for cross-wiring protection. The RIC now echoes the invocation ID received from RAPID on /next back on /response and /error, enabling RAPID t...
X Description: Summary Add Lambda-Runtime-Invocation-Id header support for cross-wiring protection. The RIC now echoes the invocation ID received from RAPID on /next back on /response and /error, enabling RAPID t...
Opengraph URL: https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/214
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:faf5952e-9af6-46ca-08b4-2170234b5c2f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CD48:DBC13:A82CD3:E8EBE2:6A63AE4E |
| html-safe-nonce | 00ca4055b1db639b996e4914831af444019b1fa0104341175584a88fe245537e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDQ4OkRCQzEzOkE4MkNEMzpFOEVCRTI6NkE2M0FFNEUiLCJ2aXNpdG9yX2lkIjoiNjc4ODAzNDc5MDQ5NDAyMzI0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 91cca3bbc9fec732ab71df7af10d68ebcc504b48b89a3c776e24f0e7e7b1d2e2 |
| hovercard-subject-tag | pull_request:4069536342 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/214/files |
| twitter:image | https://avatars.githubusercontent.com/u/237819491?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/237819491?s=400&v=4 |
| og:image:alt | Summary Add Lambda-Runtime-Invocation-Id header support for cross-wiring protection. The RIC now echoes the invocation ID received from RAPID on /next back on /response and /error, enabling RAPID t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c69b5576237034cb6ab5477391df7811093a00579a751b33bed4b527d68aade6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/aws/aws-lambda-python-runtime-interface-client git https://github.com/aws/aws-lambda-python-runtime-interface-client.git |
| octolytics-dimension-user_id | 2232217 |
| octolytics-dimension-user_login | aws |
| octolytics-dimension-repository_id | 292411453 |
| octolytics-dimension-repository_nwo | aws/aws-lambda-python-runtime-interface-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 292411453 |
| octolytics-dimension-repository_network_root_nwo | aws/aws-lambda-python-runtime-interface-client |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5c31956f7a31ef033ef93ba813dcb6f7e8eb0972 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width