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.

AWS Services Architecture Diagram and Breakdown:

Screenshot 2026-04-10 at 4 25 10 PM

Login Pipeline:

Screenshot 2026-04-10 at 4 26 39 PM

This section serves as the entry and authentication gate for the application. It manages the user’s initial interaction, using AWS Cognito to handle secure sign-in, session management, and identity verification. Once the user is successfully authenticated through the Login Page, they are granted access to the Main Page of the application.


Upload Pipeline:

Screenshot 2026-04-10 at 4 33 48 PM

This is the data ingestion engine of the project. When a user interacts with the Upload Page, the request is routed through Amazon API Gateway to trigger an upload to Amazon S3. This action serves as a "trigger" that kicks off an AWS Lambda function. The Lambda function coordinates the processing of the file—sending it for AI analysis and ensuring the resulting metadata is stored for later use.


AI Tagging

Screenshot 2026-04-10 at 4 35 33 PM

This is the intelligence layer of the architecture. It utilizes Amazon Rekognition to automatically analyze the content of uploaded images. By identifying objects, scenes, or text, this component generates descriptive tags without manual user input, adding a layer of searchable metadata to every file processed by the system.


Gallery Pipeline

Screenshot 2026-04-10 at 4 36 25 PM

This section manages data retrieval and display. It allows the user to view their stored content on the Gallery Page. When the page loads, it sends a request through Amazon API Gateway to fetch the relevant image data and AI-generated tags from Amazon DynamoDB. This ensures that the user sees an organized, tagged collection of their previous uploads.


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