You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: APIGateWayProxyEvent.request_context.authorizer results in KeyError #4102
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
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!
Updated to not-a-bug to reflect our tests... however we'll include sane default values for container types (dict/list) to avoid this situation in non-prod.
That means accessing claims will return an empty dict if not available, or an empty list when accessing scopes and that isn't available, and so on.
Activity
boring-cyborg commentedon Apr 10, 2024
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
rubenfonseca commentedon Apr 10, 2024
Looking now
rubenfonseca commentedon Apr 10, 2024
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!
rubenfonseca commentedon Apr 12, 2024
Hi @dirkdebruin can you get me the information above so we can continue to debug the problem please?
rubenfonseca commentedon Apr 15, 2024
Hi again @dirkdebruin happy to continue looking into this if you get me some more information :)
6 remaining items
heitorlessa commentedon May 7, 2024
Leandro reproduced - it doesn't happen at runtime, the key
authorizeris always present when there's an authorizer.That said, we still need to make it safe to access a
authorizerproperty and return an emptydictionaryto prevent aKeyErrorwhen testing locally.I'll get back to this as soon as I handle a runtime bug #4277
heitorlessa commentedon May 8, 2024
Updated to
not-a-bugto reflect our tests... however we'll include sane default values for container types (dict/list) to avoid this situation in non-prod.That means accessing
claimswill return an emptydictif not available, or an emptylistwhen accessing scopes and that isn't available, and so on.github-actions commentedon May 9, 2024
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
github-actions commentedon May 17, 2024
This is now released under 2.38.0 version!