Skip to content

Commit 96ab0a6

Browse files
Merge branch 'develop' into develop
2 parents 587d2fa + e771849 commit 96ab0a6

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44
<a name="unreleased"></a>
55
# Unreleased
66

7+
## Bug Fixes
8+
9+
* **docs:** correct build optimization script and docs ([#7367](https://github.com/aws-powertools/powertools-lambda-python/issues/7367))
10+
711
## Code Refactoring
812

913
* **parser:** Improve AppSync models with examples and descriptions ([#7330](https://github.com/aws-powertools/powertools-lambda-python/issues/7330))
1014

15+
## Documentation
16+
17+
* **event_handler:** add info section about types ([#7368](https://github.com/aws-powertools/powertools-lambda-python/issues/7368))
18+
1119
## Features
1220

21+
* **event_handler:** enhance OpenAPI response with headers, links, examples and encoding ([#7312](https://github.com/aws-powertools/powertools-lambda-python/issues/7312))
1322
* **parser:** add field metadata and examples for CloudWatch models ([#7343](https://github.com/aws-powertools/powertools-lambda-python/issues/7343))
1423

1524
## Maintenance

docs/build_recipes/performance-optimization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ 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.
11+
1012
## Reduce cold start times
1113

1214
1. **Minimize package size** by excluding unnecessary files

docs/core/event_handler/api_gateway.md

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

14941494
You can test your routes by passing a proxy event request with required params.
14951495

1496+
???+ info
1497+
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).
1498+
14961499
=== "API Gateway REST API"
14971500

14981501
=== "assert_rest_api_resolver_response.py"
@@ -1556,14 +1559,3 @@ You can test your routes by passing a proxy event request with required params.
15561559
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.
15571560

15581561
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.
1559-
1560-
**What happened to `ApiGatewayResolver`?**
1561-
1562-
It's been superseded by more explicit resolvers like `APIGatewayRestResolver`, `APIGatewayHttpResolver`, and `ALBResolver`.
1563-
1564-
`ApiGatewayResolver` handled multiple types of event resolvers for convenience via `proxy_type` param. However,
1565-
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.
1566-
1567-
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.
1568-
1569-
`ApiGatewayResolver` will be deprecated in v2 and have appropriate warnings as soon as we have a v2 draft.

examples/build_recipes/build_optimization/optimize-advanced.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ find build/ -name "*.so.*" -exec strip --strip-debug {} \; 2>/dev/null || true
1515
rm -rf build/*/site-packages/*/tests/
1616
rm -rf build/*/site-packages/*/test/
1717
rm -rf build/*/site-packages/*/.git/
18-
rm -rf build/*/site-packages/*/docs/
1918
rm -rf build/*/site-packages/*/examples/
2019
rm -rf build/*/site-packages/*/*.md
2120
rm -rf build/*/site-packages/*/*.rst

examples/build_recipes/build_optimization/optimize-package.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ find build/ -name "*.dist-info" -type d -exec rm -rf {} +
77
find build/ -name "tests" -type d -exec rm -rf {} +
88
find build/ -name "test_*" -delete
99

10-
# Remove documentation and examples
11-
find build/ -name "docs" -type d -exec rm -rf {} +
10+
# Remove examples
1211
find build/ -name "examples" -type d -exec rm -rf {} +
1312

1413
echo "✅ Package optimized"

0 commit comments

Comments
 (0)