Skip to content

AWS Architecture

goldy4719 edited this page Apr 10, 2026 · 2 revisions

Prerequisites

AWS Account Permissions:

  • IAM roles with FullAccess or granular permissions for S3, Lambda, Rekognition, DynamoDB, and Cognito.

Environment Configuration:

  • A designated S3 Bucket for media storage and a DynamoDB table for metadata.

Authentication:

  • An active Amazon Cognito User Pool for secure session management.

Implementation Steps

  1. Identity Management (Login Pipeline): Users authenticate via Amazon Cognito. The service verifies credentials against a User Pool and returns a JWT (JSON Web Token) to the frontend. This token authorizes all subsequent requests to the application’s backend resources.

  2. Asset Ingestion (Upload Pipeline): The frontend compresses the image and uploads it directly to an Amazon S3 bucket.

  3. Event-Driven Processing: The S3 "PutItem" event triggers an AWS Lambda function. The Backend team’s logic generates a pre-signed URL, providing the system with temporary, secure access to the image without making the bucket public.

  4. AI Analysis (Rekognition Pipeline): The Lambda function passes the pre-signed URL to Amazon Rekognition. The service performs object detection and returns a JSON object containing identified tags and confidence scores.

  5. Metadata Persistence: The analyzed tags, along with system metadata (timestamp, user ID, file size), are stored in Amazon DynamoDB.

  6. Data Retrieval (Gallery Pipeline): When a user views the gallery, the frontend calls Amazon API Gateway. This triggers a Lambda function to query DynamoDB and return the image links and associated tags to the UI.

Clone this wiki locally