# pinghunter-shubham/aws-mock architecture

> Architecture diagram of the GitHub repository pinghunter-shubham/aws-mock, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pinghunter-shubham/aws-mock
- Repository: https://github.com/pinghunter-shubham/aws-mock

## Overview

This repository provides a shared, host-native Moto endpoint for local AWS-compatible development. The main workflow is to install and start the service, provision default resources, set process-scoped AWS environment variables for a client application, and send ordinary SDK requests to the local endpoint. The README also documents status checks, shutdown, and request recording/replay. The sampled Python source implements idempotent provisioning; PowerShell script internals and the request-recording implementation were not sampled, so those relationships reflect README statements only.

Main entry points: [`host-moto/scripts/Start-AwsMock.ps1`](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Start-AwsMock.ps1) (Start Service), [`host-moto/scripts/Use-AwsMock.ps1`](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Use-AwsMock.ps1) (Set Client Environment), [`host-moto/bootstrap.py`](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/bootstrap.py) (Default Provisioning), [`host-moto`](https://github.com/pinghunter-shubham/aws-mock/tree/main/host-moto) (Request Recording)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host Operations"]
  node_install["Install Environment"]
  node_start["Start Service<br/>[Start-AwsMock.ps1]"]
  node_status["Check Status"]
  node_stop["Stop Service<br/>[Stop-AwsMock.ps1]"]
  node_env["Set Client Environment<br/>[Use-AwsMock.ps1]"]
end

subgraph group_aws["AWS Mock Services"]
  node_provision["Default Provisioning<br/>[bootstrap.py]"]
  node_endpoint["Moto Endpoint"]
  node_awsapis["AWS-Compatible APIs"]
  node_recording["Request Recording"]
  node_replay["Request Replay"]
end

subgraph group_clients["Client Access"]
  node_apps(("Local Applications"))
  node_pythonexample["Python Client Example<br/>[app.py]"]
  node_smoke["Service Smoke Test<br/>[smoke_test.py]"]
end

node_operator(("Developer"))

node_operator -->|"installs"| node_install
node_operator -->|"starts"| node_start
node_operator -->|"checks"| node_status
node_operator -->|"stops"| node_stop
node_operator -->|"enables environment"| node_env
node_start -->|"starts"| node_endpoint
node_start -->|"provisions defaults"| node_provision
node_provision -->|"creates resources through"| node_endpoint
node_endpoint -->|"serves"| node_awsapis
node_env -->|"configures"| node_apps
node_apps -->|"sends SDK requests"| node_endpoint
node_pythonexample -->|"uses SDK endpoint"| node_endpoint
node_smoke -->|"tests"| node_endpoint
node_endpoint -->|"records requests"| node_recording
node_start -->|"replays retained state"| node_replay
node_recording -->|"supplies recording"| node_replay

click node_install "https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Install-AwsMock.ps1"
click node_start "https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Start-AwsMock.ps1"
click node_status "https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Get-AwsMockStatus.ps1"
click node_stop "https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Stop-AwsMock.ps1"
click node_env "https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Use-AwsMock.ps1"
click node_provision "https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/bootstrap.py"
click node_recording "https://github.com/pinghunter-shubham/aws-mock/tree/main/host-moto"
click node_replay "https://github.com/pinghunter-shubham/aws-mock/tree/main/host-moto"
click node_pythonexample "https://github.com/pinghunter-shubham/aws-mock/blob/main/examples/python-client/app.py"
click node_smoke "https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/smoke_test.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_install,node_start,node_status,node_stop,node_env toneBlue
class node_provision,node_endpoint,node_awsapis,node_recording,node_replay toneAmber
class node_apps,node_pythonexample,node_smoke toneMint
class node_operator toneIndigo
```

## Components

### Host Operations

- [Install Environment](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Install-AwsMock.ps1): `host-moto/scripts/Install-AwsMock.ps1`
- [Start Service](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Start-AwsMock.ps1): `host-moto/scripts/Start-AwsMock.ps1`
- [Check Status](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Get-AwsMockStatus.ps1): `host-moto/scripts/Get-AwsMockStatus.ps1`
- [Stop Service](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Stop-AwsMock.ps1): `host-moto/scripts/Stop-AwsMock.ps1`
- [Set Client Environment](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/scripts/Use-AwsMock.ps1): `host-moto/scripts/Use-AwsMock.ps1`

### AWS Mock Services

- [Default Provisioning](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/bootstrap.py): `host-moto/bootstrap.py`
- **Moto Endpoint**
- **AWS-Compatible APIs**
- [Request Recording](https://github.com/pinghunter-shubham/aws-mock/tree/main/host-moto): `host-moto`
- [Request Replay](https://github.com/pinghunter-shubham/aws-mock/tree/main/host-moto): `host-moto`

### Client Access

- **Local Applications**
- [Python Client Example](https://github.com/pinghunter-shubham/aws-mock/blob/main/examples/python-client/app.py): `examples/python-client/app.py`
- [Service Smoke Test](https://github.com/pinghunter-shubham/aws-mock/blob/main/host-moto/smoke_test.py): `host-moto/smoke_test.py`

### Other components

- **Developer**

## Connections

- Developer → Install Environment: installs (evidence: `README.md`)
- Developer → Start Service: starts (evidence: `README.md`)
- Developer → Check Status: checks (evidence: `README.md`)
- Developer → Stop Service: stops (evidence: `README.md`)
- Developer → Set Client Environment: enables environment (evidence: `README.md`)
- Start Service → Moto Endpoint: starts (evidence: `README.md`)
- Start Service → Default Provisioning: provisions defaults (evidence: `README.md`)
- Default Provisioning → Moto Endpoint: creates resources through (evidence: `host-moto/bootstrap.py`)
- Moto Endpoint → AWS-Compatible APIs: serves (evidence: `README.md`)
- Set Client Environment → Local Applications: configures (evidence: `README.md`)
- Local Applications → Moto Endpoint: sends SDK requests (evidence: `README.md`)
- Python Client Example → Moto Endpoint: uses SDK endpoint (evidence: `README.md`)
- Service Smoke Test → Moto Endpoint: tests (evidence: `README.md`)
- Moto Endpoint → Request Recording: records requests (evidence: `README.md`)
- Start Service → Request Replay: replays retained state (evidence: `README.md`)
- Request Recording → Request Replay: supplies recording (evidence: `README.md`)
