This document describes the deployment model for the project, including infrastructure components, environments, and the deployment process. The application is hosted on AWS Cloud, leveraging managed services for scalability, reliability, and cost efficiency.
- Compute:
- Amazon ECS with Fargate for container orchestration
- Lambda for serverless workloads
- Networking:
- Application Load Balancer (ALB) for traffic routing
- Virtual Private Cloud (VPC) for network isolation
- Storage:
- Amazon S3 for static assets and backups
- Amazon RDS (MySQL) for relational databases
- Messaging:
- Amazon SQS for message queuing
- Amazon SNS for notifications
- Monitoring:
- Amazon CloudWatch for logs and metrics
- AWS X-Ray for tracing
- Security:
- AWS Identity and Access Management (IAM) for role-based permissions
- AWS WAF for web application security
- Developers push code changes to the
main
branch. - CI/CD Pipeline: A GitHub Actions pipeline runs:
- Static analysis (PHPStan, ESLint)
- Unit and integration tests
- Build container images
- Staging Environment:
- Deployed automatically on successful builds from
main
. - AWS ECS service runs the application.
- Deployed automatically on successful builds from
- Production Environment:
- Manual approval step in CI/CD pipeline.
- Uses blue/green deployment strategy for zero-downtime updates.
- Auto Scaling:
- ECS scales tasks based on CPU/memory utilization.
- Error Monitoring:
- Alerts configured in CloudWatch and SNS.
- Purpose: Pre-production testing
- Components:
- ECS cluster in a
staging
VPC - S3 bucket for staging assets
- RDS instance for testing
- Limited IAM permissions
- ECS cluster in a
- Purpose: Live application
- Components:
- ECS cluster in a
production
VPC - S3 bucket for live assets
- Highly available RDS instance (Multi-AZ)
- Full IAM permissions with least privilege
- ECS cluster in a
Attach an AWS Deployment Diagram
- CI/CD Tools:
- GitHub Actions for pipelines
- AWS CodeDeploy for blue/green deployments
- Infrastructure as Code (IaC):
- Terraform for provisioning AWS resources
- AWS CloudFormation for resource templates
- Monitoring and Logs:
- CloudWatch dashboards for live metrics
- Centralized log aggregation using CloudWatch Logs
- Adopt AWS Elastic Kubernetes Service (EKS) for container orchestration.
- Implement cost optimization strategies using AWS Cost Explorer.
- Integrate AWS Backup for automated database and file backups.