AWS powertools documentation change
Summary
Renamed 'HttpResolverLocal' to 'HttpResolver' and updated documentation to indicate ASGI compatibility for production use instead of local development only. Added dependency override import path warning.
Security assessment
The changes rebrand a development resolver as production-ready without evidence of security vulnerability fixes. The dependency override note prevents misconfiguration but doesn't address security flaws.
Diff
diff --git a/powertools/python/latest/core/event_handler/api_gateway.md b/powertools/python/latest/core/event_handler/api_gateway.md index 84fc36392..7423e2029 100644 --- a//powertools/python/latest/core/event_handler/api_gateway.md +++ b//powertools/python/latest/core/event_handler/api_gateway.md @@ -56 +56 @@ Metrics - * Http Resolver (Local Development) + * Http Resolver (ASGI) @@ -247 +247 @@ Table of contents - * Http Resolver (Local Development) + * Http Resolver (ASGI) @@ -595 +595 @@ Resolver | AWS service -**`HttpResolverLocal`** | Local development with ASGI servers +**`HttpResolverLocal`** | ASGI-compatible resolver @@ -1538 +1538 @@ Example payload delivered to the handler -#### Http Resolver (Local Development)¶ +#### Http Resolver (ASGI)¶ @@ -1540,5 +1540 @@ Example payload delivered to the handler -Local Development Only - -`HttpResolverLocal` is intended for local development and testing only. The API may change in future releases. **Do not use in production environments.** - -When developing locally, you can use `HttpResolverLocal` to run your API with any ASGI server like [uvicorn](https://www.uvicorn.org/). It implements the [ASGI specification](https://asgi.readthedocs.io/), is lightweight with no external dependencies, and the same code works on any compute platform, including Lambda. +`HttpResolver` is an ASGI-compatible resolver that lets you run your Powertools application with any ASGI server like [uvicorn](https://www.uvicorn.org/). It implements the [ASGI specification](https://asgi.readthedocs.io/), is lightweight with no external dependencies, and works seamlessly with Lambda or any environment that speaks HTTP. @@ -1582 +1578 @@ Basic UsageWith Validation & SwaggerException Handling - from aws_lambda_powertools.event_handler import HttpResolverLocal + from aws_lambda_powertools.event_handler import HttpResolver @@ -1584 +1580 @@ Basic UsageWith Validation & SwaggerException Handling - app = HttpResolverLocal() + app = HttpResolver() @@ -1631 +1627 @@ Run locally: `uvicorn app:app --reload` - from aws_lambda_powertools.event_handler import HttpResolverLocal + from aws_lambda_powertools.event_handler import HttpResolver @@ -1639 +1635 @@ Run locally: `uvicorn app:app --reload` - app = HttpResolverLocal(enable_validation=True) + app = HttpResolver(enable_validation=True) @@ -1700 +1696 @@ Access Swagger UI at `http://localhost:8000/swagger` - from aws_lambda_powertools.event_handler import HttpResolverLocal, Response + from aws_lambda_powertools.event_handler import HttpResolver, Response @@ -1702 +1698 @@ Access Swagger UI at `http://localhost:8000/swagger` - app = HttpResolverLocal() + app = HttpResolver() @@ -8686,0 +8683,52 @@ Use `dependency_overrides` to replace any dependency with a mock or stub during +---|--- + +Import path must match exactly when using dependency_overrides + +When using `dependency_overrides` in tests, the imported dependency reference must use the **exact same import path** as the handler file. Python treats differently-imported modules as different objects in `sys.modules`, so the override will be silently ignored otherwise. + +✅ Correct❌ Wrong + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + +| + + + # handler.py + from depends import get_config + + # test_handler.py - matches handler's import path exactly + from depends import get_config + + app.dependency_overrides[get_config] = lambda: "test-value" + + +---|--- + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + +| + + + # handler.py + from depends import get_config + + # test_handler.py - different import path, override won't apply + from my_app.api_handler.depends import get_config + + app.dependency_overrides[get_config] = lambda: "test-value" + + @@ -10265 +10313 @@ That said, [Chalice has native integration with Lambda Powertools](https://aws.g -2026-04-27 +2026-06-22