Skip to content

Commit bdfa75d

Browse files
docs(event_handler): add info section about types (#7368)
Add info to APIGW docs
1 parent 7d0f7ce commit bdfa75d

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

docs/build_recipes/performance-optimization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Optimize Lambda functions for better performance and reduced costs
77

88
Optimize your Lambda functions for better performance, reduced cold start times, and lower costs. These techniques help minimize package size, improve startup speed, and reduce memory usage.
99

10-
Always validate your function's behavior after applying optimizations to ensure an optimization hasn't introduced any issues with your packages. For example, removal of directories that appear to be unnecessary, such as `docs`, can break some libraries.
10+
Always validate your function's behavior after applying optimizations to ensure an optimization hasn't introduced any issues with your packages. For example, removal of directories that appear to be unnecessary, such as `docs`, can break some libraries.
1111

1212
## Reduce cold start times
1313

docs/core/event_handler/api_gateway.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,9 @@ Each endpoint will be it's own Lambda function that is configured as a [Lambda i
14821482

14831483
You can test your routes by passing a proxy event request with required params.
14841484

1485+
???+ info
1486+
Fields such as headers and query strings are always delivered as strings when events reach Lambda. When testing your Lambda function with local events, we recommend using the sample events available in our [repository](https://github.com/aws-powertools/powertools-lambda-python/tree/develop/tests/events).
1487+
14851488
=== "API Gateway REST API"
14861489

14871490
=== "assert_rest_api_resolver_response.py"
@@ -1545,14 +1548,3 @@ You can test your routes by passing a proxy event request with required params.
15451548
Chalice is a full featured microframework that manages application and infrastructure. This utility, however, is largely focused on routing to reduce boilerplate and expects you to setup and manage infrastructure with your framework of choice.
15461549

15471550
That said, [Chalice has native integration with Lambda Powertools](https://aws.github.io/chalice/topics/middleware.html){target="_blank" rel="nofollow"} if you're looking for a more opinionated and web framework feature set.
1548-
1549-
**What happened to `ApiGatewayResolver`?**
1550-
1551-
It's been superseded by more explicit resolvers like `APIGatewayRestResolver`, `APIGatewayHttpResolver`, and `ALBResolver`.
1552-
1553-
`ApiGatewayResolver` handled multiple types of event resolvers for convenience via `proxy_type` param. However,
1554-
it made it impossible for static checkers like Mypy and IDEs IntelliSense to know what properties a `current_event` would have due to late bound resolution.
1555-
1556-
This provided a suboptimal experience for customers not being able to find all properties available besides common ones between API Gateway REST, HTTP, and ALB - while manually annotating `app.current_event` would work it is not the experience we want to provide to customers.
1557-
1558-
`ApiGatewayResolver` will be deprecated in v2 and have appropriate warnings as soon as we have a v2 draft.

0 commit comments

Comments
 (0)