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
Copy file name to clipboardExpand all lines: docs/core/event_handler/api_gateway.md
+43Lines changed: 43 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -435,6 +435,49 @@ Additionally, we provide pre-defined errors for the most popular ones such as HT
435
435
return app.resolve(event, context)
436
436
```
437
437
438
+
439
+
### Custom Domain API Mappings
440
+
441
+
When using Custom Domain API Mappings feature, you must use **`strip_prefixes`** param in the `ApiGatewayResolver` constructor.
442
+
443
+
Scenario: You have a custom domain `api.mydomain.dev` and set an API Mapping `payment` to forward requests to your Payments API, the path argument will be `/payment/<your_actual_path>`.
444
+
445
+
This will lead to a HTTP 404 despite having your Lambda configured correctly. See the example below on how to account for this change.
446
+
447
+
448
+
=== "app.py"
449
+
450
+
```python hl_lines="7"
451
+
from aws_lambda_powertools import Logger, Tracer
452
+
from aws_lambda_powertools.logging import correlation_paths
453
+
from aws_lambda_powertools.event_handler.api_gateway import ApiGatewayResolver
0 commit comments