APIGatewayProxyEventV2: Headers Property in BaseProxyEvent Returns Incorrect Type #30541
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
In the AWS CDK, the BaseProxyEvent class, which is the parent class of APIGatewayProxyEventV2, contains a property headers that is supposed to return a dictionary. However, when using the APIGatewayProxyEventV2 class, the headers property returns a string instead of a dictionary, which is inconsistent with the documented behavior of BaseProxyEvent.
Expected Behavior
The headers property of the BaseProxyEvent class (and its subclass APIGatewayProxyEventV2) should return a dictionary as per its property definition and documentation.
Current Behavior
The headers property of the APIGatewayProxyEventV2 class returns a string instead of a dictionary.
Reproduction Steps
Create a lambda function (with the following code) that is triggered by a gateway endpoint (Proxy integration).
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.128.0 (build d995261)
Framework Version
No response
Node.js Version
10.8.1
OS
Windows 11
Language
Python
Language Version
3.11.9
Other information
No response
The text was updated successfully, but these errors were encountered: