Skip to content

Commit 9ceae0e

Browse files
committed
Added tip for automatic response transformation
1 parent 63b23dc commit 9ceae0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/features/event-handler/rest.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ For your convenience, when you return a JavaScript object from your route handle
9292
--8<-- "examples/snippets/event-handler/rest/samples/gettingStarted_serialization.json"
9393
```
9494

95+
!!! tip "Automatic response format transformation"
96+
The event handler automatically ensures the correct response format is returned based on the event type received. For example, if your handler returns an API Gateway v1 proxy response but processes an ALB event, we'll automatically transform it into an ALB-compatible response. This allows you to swap integrations (e.g., from API Gateway to ALB) with little to no code changes.
97+
9598
### Dynamic routes
9699

97100
You can use `/todos/:todoId` to configure dynamic URL paths, where `:todoId` will be resolved at runtime.

0 commit comments

Comments
 (0)