Skip to content

Local Lab Harness

goldy4719 edited this page Apr 10, 2026 · 1 revision

Overview:

The local lab harness executes Amazon Rekognition detect_labels against S3 images in a controlled environment. It produces raw JSON outputs and summarized label results, enabling fast iteration and debugging before moving logic into production.

Prerequisites

  • AWS credentials available locally
  • Permissions for rekognition:DetectLabels and s3:GetObject
  • Local module structure for rekognition_lab/
  • Writable output directory for raw responses

Implementation/Steps

  1. The system accepts S3 bucket and key inputs through a CLI interface.
  2. The system initializes an AWS session using either a provided profile or default credentials.
  3. The system sends the S3 image reference to Rekognition using detect_labels.
  4. The system stores the full JSON response in a deterministic file path.
  5. The system outputs a summary including source location, total labels, and top results sorted by confidence.

Key Takeaways

  • The lab harness isolates development from production workflows.
  • Raw responses are always preserved for debugging.
  • Deterministic output supports repeatable testing.
  • Summary output reflects sorted label confidence.

Clone this wiki locally