Skip to content

Commit 9f1b5d5

Browse files
committed
Update Lambda invocation ID header name
1 parent a402388 commit 9f1b5d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bootstrap

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ while (true) {
6262

6363
[$name, $value] = preg_split('/:\s*/', $header, 2);
6464

65-
if (strtolower($name) == 'x-amz-aws-request-id') {
65+
if (strtolower($name) == 'lambda-runtime-aws-request-id') {
6666
$invocation_id = trim($value);
6767
}
6868

@@ -83,6 +83,10 @@ while (true) {
8383
die('Failed to fetch next Lambda invocation: ' . curl_error($ch) . "\n");
8484
}
8585

86+
if ($invocation_id == '') {
87+
die('Failed to determine Lambda invocation ID');
88+
}
89+
8690
curl_close($ch);
8791

8892
if (!$body) {

0 commit comments

Comments
 (0)