-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: APIGateWayProxyEvent.request_context.authorizer results in KeyError #4102
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Looking now |
Hi @dirkdebruin thank you for opening this issue! It seems that you are trying to use the Event Source feature directly without using any event handler resolver, which is ok. However, I need to understand more about which event source are you connecting this Lambda handler to. Can you please clear this up for me? Alternatively you could also paste the input payload (redact any unwanted info) that is being passed to the Lambda handler? Thank you! |
Hi @dirkdebruin can you get me the information above so we can continue to debug the problem please? |
Hi again @dirkdebruin happy to continue looking into this if you get me some more information :) |
Hey, @rubenfonseca! I'm actually having the similar issue with accessing to
But using
|
hey @AndreyNenashev -- does that happen at runtime (real invocation) or when testing only? What we've been trying to get confirmation is whether: A. There's a bug in the Event Source Data Class in accessing the or B. It fails with tests events as the For the former, the For the latter, we're looking to address this in multiple places: #2605 |
Quick update. @leandrodamascena is creating a stack to reproduce this with Cognito Authorizer to confirm. If we reproduce, we'll send a fix by having sane defaults here. |
Leandro reproduced - it doesn't happen at runtime, the key That said, we still need to make it safe to access a I'll get back to this as soon as I handle a runtime bug #4277 |
Updated to That means accessing |
|
This is now released under 2.38.0 version! |
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
The text was updated successfully, but these errors were encountered: