# coinhexa/aws-free-tier-stack architecture

> Architecture diagram of the GitHub repository coinhexa/aws-free-tier-stack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/coinhexa/aws-free-tier-stack
- Repository: https://github.com/coinhexa/aws-free-tier-stack

## Overview

##### Main Components

a) Core Infrastructure Components:
- CloudFormation Stack (as the primary deployment mechanism)
- SNS Topic (for notifications and alarms)
- AWS Budgets (for cost monitoring)
- CloudTrail (for audit logging)
- EventBridge/CloudWatch Events (for monitoring root user activity)
- CloudWatch Alarms (for budget and security monitoring)

b) External Components:
- Email Subscribers (SES integration)
- AWS Root Account (being monitored)

##### Specific Design Elements

Use the following visual elements:

##### Flow Representation

Following key flows:
a) Monitoring Flows:
- CloudTrail → CloudWatch
- AWS Budgets → CloudWatch Alarms
- Root Account Activity → EventBridge

b) Notification Flows:
- All monitoring components → SNS Topic → Email Subscribers

##### Important Notes

- That all components are deployed via CloudFormation
- A note about US-EAST-1 region requirement
- Free tier compatibility

Create distinct sections for:
- Cost Management (AWS Budgets)
- Security Monitoring (Root user monitoring)
- Audit Logging (CloudTrail)
- Notification System (SNS)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "End Users Layer"
        Users[External Users/Administrators]:::external
    end

    subgraph "Monitoring & Alerting Layer"
        Budget[AWS Budgets]:::monitoring
        CWAlarms[CloudWatch Alarms]:::monitoring
        EventBridge[EventBridge Rules]:::monitoring
    end

    subgraph "Core Infrastructure Layer"
        CFStack[CloudFormation Stack]:::core
        SNS[SNS Topic]:::core
        CloudTrail[CloudTrail]:::security
        RootAcc[Root Account]:::security
    end

    %% Relationships
    CFStack --> Budget
    CFStack --> CWAlarms
    CFStack --> EventBridge
    CFStack --> SNS
    CFStack --> CloudTrail

    Budget --> CWAlarms
    CloudTrail --> EventBridge
    RootAcc --> EventBridge

    CWAlarms --> SNS
    EventBridge --> SNS
    SNS --> Users

    %% Click Events
    click CFStack "https://github.com/Coinhexa/aws-free-tier-stack/blob/main/stack.yml"

    %% Styles
    classDef external fill:#gray,stroke:#333,stroke-width:2px
    classDef monitoring fill:#90EE90,stroke:#333,stroke-width:2px
    classDef core fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef security fill:#FFB6C1,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[External Components]:::external
        L2[Monitoring Services]:::monitoring
        L3[Core Services]:::core
        L4[Security Components]:::security
    end

    %% Notes
    note["All components are Free Tier compatible<br/>Deployed in US-EAST-1"]
    style note fill:#fff,stroke:#333,stroke-width:1px
```
