# On AWS

> The reference implementation of Sypnia Agent on AWS, service by service.

Applies to: Sypnia Cloud (paid service).  
Source: https://agent.docs.sypnia.com/architecture/aws/

For agents: AWS: CloudFront (agent.app.sypnia.com SPA; agent.api.sypnia.com and mcp.agent.sypnia.com to Lambda), Lambda (Node 22: API, MCP, orchestrator steps), SQS + DLQ (step queue), ECS Fargate (one sandbox task per agent task, no public IP, private subnets, egress via the Rust proxy and a NAT with allowlist), S3 (logs, artifacts), Sypnia Data project (tasks, memory, profiles), Sypnia AI (models), EventBridge (task events to Cases/Git), SNS/mobile push via the App, SSM/KMS. Credits via the Sypnia Cloud ledger.

| Service                            | What it does here                                                                                         |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------- |
| **CloudFront**                     | the web app (`agent.app.sypnia.com`) and the API and MCP (`agent.api.sypnia.com`, `mcp.agent.sypnia.com`) |
| **Lambda** (Node 22)               | the API, MCP, and the orchestrator's steps                                                                |
| **SQS** (with a dead-letter queue) | the queue of steps, so a long task survives any single function                                           |
| **ECS Fargate**                    | one isolated sandbox per task, in private subnets without public addresses, destroyed at the end          |
| **The egress proxy** (Rust)        | the only way out of a sandbox; allows only the listed addresses                                           |
| **S3**                             | full logs and build artifacts                                                                             |
| **Sypnia Data**                    | tasks, steps, approvals, memory and profiles                                                              |
| **Sypnia AI**                      | the models, paid with credits                                                                             |
| **EventBridge**                    | task events for Cases and Git                                                                             |
| **SSM and KMS**                    | secrets, injected into sandboxes that need them, never into prompts                                       |
| **The credits ledger**             | holds and spends a task's budget                                                                          |
