# yeoli9/lambda-starterpack architecture

> Architecture diagram of the GitHub repository yeoli9/lambda-starterpack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yeoli9/lambda-starterpack
- Repository: https://github.com/yeoli9/lambda-starterpack

## Overview

##### Main Components

a) Client Layer:
- External clients/applications making HTTP requests
- Custom domain (api.example.com)

- API Gateway
- Custom Authorizer Lambda Function
- Hello World Lambda Function
- Route 53 (DNS service)
- ACM (Certificate Manager)

##### Specific Elements

a) Authentication Flow:
- Custom header authentication ('MyCustomAuthHeader')
- Authorization flow from API Gateway to Authorizer Lambda

b) AWS Services Integration:
- ACM certificate association with API Gateway
- Route 53 DNS resolution flow

##### Additional Details

- Development tools used (SAM CLI, AWS CLI)
- Required IAM permissions note
- Deployment flow indication

##### Important Notes

- Deployment prerequisites
- Resource dependencies
- Security boundaries
- Required IAM permissions

- Serverless architecture pattern
- Security implementation (custom authorizer)
- AWS service integration points
- DNS and custom domain configuration

- The complete request flow
- Security implementation
- Service dependencies
- Deployment requirements

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        client[Client Application]
    end

    subgraph "AWS Cloud"
        subgraph "DNS & Security Layer"
            route53[Route 53]:::dns
            acm[Certificate Manager]:::security
        end

        subgraph "API Layer"
            apigw[API Gateway]:::api
            domain["api.example.com"]:::domain
        end

        subgraph "Lambda Layer"
            auth[Custom Authorizer]:::lambda
            hello[Hello World Function]:::lambda
        end
    end

    %% Connections
    client --> route53
    route53 --> domain
    domain --> apigw
    apigw --> auth
    auth --> apigw
    apigw --> hello
    acm --> apigw

    %% Annotations
    classDef dns fill:#88ccee
    classDef security fill:#ffdd99
    classDef api fill:#cc99ff
    classDef lambda fill:#ff9966
    classDef domain fill:#99ff99

    %% Click Events
    click auth "https://github.com/yeoli9/Lambda-StarterPack/blob/master/authorizer/app.py"
    click hello "https://github.com/yeoli9/Lambda-StarterPack/blob/master/hello_world/app.py"
    click apigw "https://github.com/yeoli9/Lambda-StarterPack/blob/master/template.yaml"
    click route53 "https://github.com/yeoli9/Lambda-StarterPack/blob/master/template.yaml"
    click acm "https://github.com/yeoli9/Lambda-StarterPack/blob/master/template.yaml"

    %% Legend
    subgraph Legend
        l1[DNS Service]:::dns
        l2[Security Service]:::security
        l3[API Gateway]:::api
        l4[Lambda Function]:::lambda
        l5[Custom Domain]:::domain
    end
```
