-
Notifications
You must be signed in to change notification settings - Fork 8
Lambda Handler
goldy4719 edited this page Apr 10, 2026
·
1 revision
The Lambda handler processes uploaded images by invoking Rekognition, applying the shared parser, and returning normalized tag data. It serves as the production execution point within the backend pipeline.
- Shared parser module
- Defined Lambda event contract
- Permissions for Rekognition, S3, and optional DynamoDB writes
- Environment variables for runtime configuration
- The system receives an event and extracts the S3 bucket and key.
- The system invokes
detect_labelsusing the image reference. - The system passes the raw response into the shared parser.
- The system logs structured metadata including request ID, bucket, key, and tag count.
- The system returns normalized tags according to the defined contract.
- The system handles both S3-triggered and direct invocation events within a unified flow.
- The Lambda reuses shared parsing logic without duplication.
- Event normalization ensures consistent processing paths.
- Structured logging supports traceability.
- Output strictly follows the defined contract.