Expand description
Shared utilities for AWS Lambda handlers
This module provides common functionality used across all Lambda functions including DynamoDB operations, request/response transformations, and helper functions.
Modules§
- auth
- Authentication module for WebSocket connections
- content_
rewrite - Content rewriting module for path-based routing
- error_
handling - Error handling and sanitization
- handlers
- Handler modules
Structs§
- Shared
Clients - Shared AWS clients used across all handlers
Functions§
- build_
api_ gateway_ response - Convert HttpResponse to API Gateway response
- build_
http_ request - Build HttpRequest from API Gateway event
- delete_
connection - Delete connection from DynamoDB
- extract_
tunnel_ id_ from_ path - Extract tunnel ID from request path (path-based routing) Example: “/abc123/api/users” -> “abc123”
- is_
event_ driven_ enabled - Check if event-driven response pattern is enabled
- lookup_
connection_ by_ tunnel_ id - Look up connection ID by tunnel ID using GSI (path-based routing)
- save_
connection_ metadata - Save connection metadata to DynamoDB
- save_
pending_ request - Save pending request to DynamoDB
- send_
to_ connection - Send message to WebSocket connection
- strip_
tunnel_ id_ from_ path - Strip tunnel ID from path before forwarding to local service Example: “/abc123/api/users” -> “/api/users” Example: “/abc123” -> “/”
- update_
pending_ request_ with_ response - Update pending request with response data
- wait_
for_ response - Wait for response with event-driven or polling approach based on USE_EVENT_DRIVEN flag