-
Notifications
You must be signed in to change notification settings - Fork 489
Open
Labels
bugThis issue is a bug.This issue is a bug.module/lambda-client-libp2This is a standard priority issueThis is a standard priority issuepr/needs-reviewThis PR needs a review from a Member.This PR needs a review from a Member.
Description
Describe the bug
RIC expects to get case sensitive (capitalized kebab case) headers from the Lambda Runtime API.
aws-lambda-dotnet/Libraries/src/Amazon.Lambda.RuntimeSupport/Client/RuntimeApiHeaders.cs
Lines 22 to 28 in 3c68321
internal const string HeaderAwsRequestId = "Lambda-Runtime-Aws-Request-Id"; | |
internal const string HeaderTraceId = "Lambda-Runtime-Trace-Id"; | |
internal const string HeaderClientContext = "Lambda-Runtime-Client-Context"; | |
internal const string HeaderCognitoIdentity = "Lambda-Runtime-Cognito-Identity"; | |
internal const string HeaderDeadlineMs = "Lambda-Runtime-Deadline-Ms"; | |
internal const string HeaderInvokedFunctionArn = "Lambda-Runtime-Invoked-Function-Arn"; | |
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
This should be case insensitive.
It works perfectly for NodeJS
-- edit:
Also works perfectly for Java, Python, and Ruby
Current Behavior
When building a rust Proxy Server for the Lambda Runtime API, I get the following error when working in .NET functions.
Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'Lambda-Runtime-Aws-Request-Id' was not present in the dictionary.
--
| 2025-06-17T19:10:32.131Z | at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
| 2025-06-17T19:10:32.131Z | at Amazon.Lambda.RuntimeSupport.RuntimeApiHeaders..ctor(Dictionary`2 headers) in /src/Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Client/RuntimeApiHeaders.cs:line 32
| 2025-06-17T19:10:32.131Z | at Amazon.Lambda.RuntimeSupport.RuntimeApiClient.GetNextInvocationAsync(CancellationToken cancellationToken) in /src/Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Client/RuntimeApiClient.cs:line 112
| 2025-06-17T19:10:32.131Z | at Amazon.Lambda.RuntimeSupport.LambdaBootstrap.InvokeOnceAsync(CancellationToken cancellationToken) in /src/Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/LambdaBootstrap.cs:line 261
| 2025-06-17T19:10:32.131Z | at Amazon.Lambda.RuntimeSupport.LambdaBootstrap.RunAsync(CancellationToken cancellationToken) in /src/Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/LambdaBootstrap.cs:line 224
| 2025-06-17T19:10:32.131Z | at Amazon.Lambda.RuntimeSupport.RuntimeSupportInitializer.RunLambdaBootstrap() in /src/Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/RuntimeSupportInitializer.cs:line 70
| 2025-06-17T19:10:32.131Z | at Amazon.Lambda.RuntimeSupport.Program.Main(String[] args) in /src/Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs:line 48
| 2025-06-17T19:10:32.131Z | at Amazon.Lambda.RuntimeSupport.Program.<Main>(String[] args)
Reproduction Steps
Build a Lambda Runtime API proxy in Rust, then just do a bypass and see how it fails for .NET
Possible Solution
Making header lookup case insensitive
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
n/a
Targeted .NET Platform
.NET 6 and .NET 8
Operating System and version
AWS Lambda
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.module/lambda-client-libp2This is a standard priority issueThis is a standard priority issuepr/needs-reviewThis PR needs a review from a Member.This PR needs a review from a Member.