Describe the bug
When locally invoking a function through the local server, any HTTP header passed to the server are not forwarded to the Lambda Interface Client.
This prevents to test Tenant-ID for example.
curl -v -d @event.json -H "X-Amz-Tenant-Id: 123" http://127.0.0.1:7000/invoke
* Trying 127.0.0.1:7000...
* Connected to 127.0.0.1 (127.0.0.1) port 7000
> POST /invoke HTTP/1.1
> Host: 127.0.0.1:7000
> User-Agent: curl/8.7.1
> Accept: */*
> X-Amz-Tenant-Id: 123
> Content-Length: 3107
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 3107 bytes
< HTTP/1.1 202 Accepted
< Content-Length: 49
<
* Connection #0 to host 127.0.0.1 left intact
{"body":"No Tenant ID provided","statusCode":400}%
This happens here
|
self.invocationPool.push(LocalServerInvocation(requestId: requestId, request: body)) |
Expected Behavior
The HTTP headers received by the local server must be passed down to the Lambda Runtime.
Current Behavior
HTTP Headers are not forwarded.
Reproduction Steps
See above
Possible Solution
Change the local server to forward all HTTP headers received to the Lambda runtime client
Additional Information/Context
n/a
AWS SWIFT SDK version used
n/a
Compiler and Version used
n/a
Operating System and version
n/a
Describe the bug
When locally invoking a function through the local server, any HTTP header passed to the server are not forwarded to the Lambda Interface Client.
This prevents to test Tenant-ID for example.
This happens here
swift-aws-lambda-runtime/Sources/AWSLambdaRuntime/Lambda+LocalServer.swift
Line 410 in 0305cb3
Expected Behavior
The HTTP headers received by the local server must be passed down to the Lambda Runtime.
Current Behavior
HTTP Headers are not forwarded.
Reproduction Steps
See above
Possible Solution
Change the local server to forward all HTTP headers received to the Lambda runtime client
Additional Information/Context
n/a
AWS SWIFT SDK version used
n/a
Compiler and Version used
n/a
Operating System and version
n/a