generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 467
Closed
Labels
Description
Expected Behaviour
returns authorizer dictionary
Current Behaviour
KeyError
Code snippet
powertools-lambda-python/aws_lambda_powertools/utilities/data_classes/api_gateway_proxy_event.py
line 94 in class APIGatewayEventRequestContext
def authorizer(self) -> APIGatewayEventAuthorizer:
return APIGatewayEventAuthorizer(self._data["requestContext"]["authorizer"])Possible Solution
def authorizer(self) -> APIGatewayEventAuthorizer:
return APIGatewayEventAuthorizer(self.["requestContext"].get("authorizer"))Steps to Reproduce
@event_source(data_class=APIGatewayProxyEvent)
def handler(event: APIGatewayProxyEvent, context):
authorizer = event.request_context.authorizerPowertools for AWS Lambda (Python) version
2.36.0
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped