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
defauthorizer(self) ->APIGatewayEventAuthorizer:
returnAPIGatewayEventAuthorizer(self._data["requestContext"]["authorizer"])
Possible Solution
defauthorizer(self) ->APIGatewayEventAuthorizer:
returnAPIGatewayEventAuthorizer(self.["requestContext"].get("authorizer"))Steps to Reproduce
@event_source(data_class=APIGatewayProxyEvent)defhandler(event: APIGatewayProxyEvent, context):
authorizer=event.request_context.authorizer
Powertools for AWS Lambda (Python) version
2.36.0
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs
No response
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
Possible Solution
Steps to Reproduce
Powertools for AWS Lambda (Python) version
2.36.0
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs
No response