Architecting Saney: A Resilient, Multi-AZ AWS Infrastructure
Saney’s cloud infrastructure is engineered for high availability, strict security, and serverless scalability. Designed on AWS, the architecture separates operational workloads while maintaining a resilient, event-driven ecosystem.
Edge Delivery & User Authentication Incoming user traffic enters through Amazon Route 53 for global DNS routing. Static frontend assets are cached at the edge using Amazon CloudFront backed by Amazon Simple Storage Service (S3). User identity and authentication are offloaded to Amazon Cognito, keeping authentication isolated from core backend logic.
Containerized Compute & Event Bus The core compute layer is deployed inside a Virtual Private Cloud (VPC) distributed across two Availability Zones (AZs) for high availability:
Ingress & Routing: An Application Load Balancer (ALB) sits in the public subnet behind an Internet Gateway to distribute incoming API traffic across private subnets.
Serverless Compute: Workloads run on AWS Fargate within private subnets. Tasks are decoupled by workload type—Builder tasks run in AZ 1 while Viewer tasks execute in AZ 2—preventing compute bottlenecks during heavy operations.
Event-Driven Architecture: Amazon EventBridge acts as the central event bus, orchestrating asynchronous communication between the Builder and Viewer container tasks.
Data & Caching Layer
Database: Amazon RDS operates in dedicated private database subnets, utilizing multi-AZ replication to ensure seamless data persistence and automated failover.
In-Memory Caching: Amazon ElastiCache sits in front of the database layer to cache frequent queries and reduce read latency.
Observability, Security & DevOps
Monitoring: Distributed tracing is captured via AWS X-Ray, while system metrics and logs are centralized in Amazon CloudWatch. Critical performance alarms trigger Amazon SNS to push instant alerts directly to Gmail.
Security & Governance: Operational security relies on AWS KMS for encryption, AWS Secrets Manager for credential rotation, and AWS IAM Identity Center for access governance.
CI/CD & IaC: The entire infrastructure is managed as code using Terraform. Container builds and deployments are automated through GitHub Actions and stored in Amazon Elastic Container Registry (ECR).
Disaster Recovery: A secondary AWS Region hosts AWS Backup vaults and cross-region S3 replication to guarantee data recovery in extreme outages.




