# ajaykumarsimhadri/aws-facial_rekognition architecture

> Architecture diagram of the GitHub repository ajaykumarsimhadri/aws-facial_rekognition, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ajaykumarsimhadri/aws-facial_rekognition
- Repository: https://github.com/ajaykumarsimhadri/aws-facial_rekognition

## Overview

##### Project type and purpose
- This is a small serverless AWS-based face‐recognition utility.
- It consists of two client scripts (putimages.py for uploading images, lamdafunction.py as Lambda code), AWS infra definitions (policy.json), and a test suite.
- It uses S3 for storage, Rekognition for face indexing/search, DynamoDB for metadata, and IAM for permissions.

##### File structure
- Top level:
– README.md: setup & AWS CLI commands
– lamdafunction.py: the AWS Lambda handler code
– policy.json: IAM role/policy for Lambda permissions
– putimages.py: client script to upload images to S3
- test/:
– testing.py: unit or integration tests for the Lambda and/or upload logic

##### README for additional insights
- It walks you through installing aws-shell, configuring AWS credentials, creating a Rekognition collection, a DynamoDB table, and an S3 bucket.

##### Detailed breakdown
- AWS CLI (aws-shell)
- putimages.py

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        CLI["AWS CLI (aws-shell)"]:::cli
        PutImages["putimages.py"]:::cli
        Readme["README.md"]:::cli
        TestSuite["testing.py"]:::test
    end

    %% AWS Cloud
    subgraph "AWS Cloud"
        subgraph "Serverless Services"
            S3["S3 Bucket"]:::storage
            Lambda["Lambda Function\n(lamdafunction.py)"]:::compute
            Rekognition["Rekognition Service"]:::service
            DynamoDB["DynamoDB Table"]:::storage
            IAM["IAM Role & Policy\n(policy.json)"]:::security
        end
    end

    %% Connections
    PutImages -->|"uploads via PutObject"| S3
    Readme -->|"provides setup instructions"| CLI
    S3 -->|"ObjectCreated invokes"| Lambda
    IAM -.->|"attached role"| Lambda
    Lambda -->|"IndexFaces/SearchFaces"| Rekognition
    Lambda -->|"PutItem"| DynamoDB
    TestSuite -->|"tests upload & Lambda"| PutImages
    TestSuite -->|"tests handler"| Lambda

    %% Click Events
    click PutImages "https://github.com/ajaykumarsimhadri/aws-facial_rekognition/blob/main/putimages.py"
    click Readme "https://github.com/ajaykumarsimhadri/aws-facial_rekognition/blob/main/README.md"
    click Lambda "https://github.com/ajaykumarsimhadri/aws-facial_rekognition/blob/main/lamdafunction.py"
    click IAM "https://github.com/ajaykumarsimhadri/aws-facial_rekognition/blob/main/policy.json"
    click TestSuite "https://github.com/ajaykumarsimhadri/aws-facial_rekognition/blob/main/test/testing.py"

    %% Styles
    classDef cli fill:#d0e7ff,stroke:#2196f3,color:#000;
    classDef compute fill:#d0ffd8,stroke:#4caf50,color:#000;
    classDef storage fill:#ffe0b2,stroke:#fb8c00,color:#000;
    classDef service fill:#fff9c4,stroke:#fbc02d,color:#000;
    classDef security fill:#ffcdd2,stroke:#e53935,color:#000;
    classDef test fill:#e1bee7,stroke:#8e24aa,color:#000
```
