-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Labels
area/testingImprovements to tests.Improvements to tests.good first issueGood for newcomersGood for newcomerskind/bugFeature doesn't work as expected.Feature doesn't work as expected.size/SSmall task. (A couple of hours of work.)Small task. (A couple of hours of work.)🆕 semver/minorAdds new public API.Adds new public API.
Description
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
Metadata
Metadata
Assignees
Labels
area/testingImprovements to tests.Improvements to tests.good first issueGood for newcomersGood for newcomerskind/bugFeature doesn't work as expected.Feature doesn't work as expected.size/SSmall task. (A couple of hours of work.)Small task. (A couple of hours of work.)🆕 semver/minorAdds new public API.Adds new public API.