-
Notifications
You must be signed in to change notification settings - Fork 428
Bug: Remove get_lambda function from API Gateway proxy event #3453
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
Comments
Adding update as it turned out docs were wrong, Potential solution discussed in today's sync: from aws_lambda_powertools.utilities.data_classes.api_gateway_proxy_event import APIGatewayProxyEvent, APIGatewayProxyEventV2
a = APIGatewayProxyEvent({})
b = APIGatewayProxyEventV2({})
ctx: dict = a.request_context.authorizer.get_context() # or get_lambda_context
ctx_two: dict = b.request_context.authorizer.get_context() # or get_lambda_context
ctx.get("tenant_id")
ctx_two.get("tenant_id") |
|
This is now released under 2.29.0 version! |
Expected Behaviour
The API Gateway v2 payload doesn´t have any field called
lambda
and we should not have this in our Data Class.Current Behaviour
Unecessary get_lambda function.
Code snippet
Possible Solution
Remove this and adjust tests/payload
Steps to Reproduce
No necessary
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.10
Packaging format used
PyPi
Debugging logs
No response
The text was updated successfully, but these errors were encountered: