fix(lambda): expose the executing version on cold launches (#5523)

* fix(lambda): expose the executing version on cold launches

Signed-off-by: Andre Kurait <akurait@amazon.com>

* fix(lambda): propagate executing version to Kubernetes pods

Signed-off-by: Andre Kurait <akurait@amazon.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-12 16:56:44 -04:00
1 parent 431748f740
commit 8565ad837a
6 files changed
+82 -4

No files matched your search

+6
View File
@@ -376,6 +376,12 @@ returns the qualified one (`...:function:name:2`), as `PublishVersion` does. Wit
both answer for `$LATEST` and create nothing. `UpdateFunctionConfiguration` has no `Publish`
parameter in the AWS API and none here.
On a cold launch, `AWS_LAMBDA_FUNCTION_VERSION` contains the executing version:
`$LATEST` for an unqualified invocation and the published version number for a
version or alias invocation. This follows the
[Lambda environment variable contract](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime)
and was checked against live AWS in `us-east-1` on October 12, 2026 at 19:49 UTC.
`DeleteFunction` honours `Qualifier` — it removes that published version only, leaving `$LATEST`,
the other versions and the function's aliases in place; without a qualifier the whole function
goes. Matching the live service, deleting `$LATEST` by qualifier and naming an alias are both