Skip to content

XxrzxX/ChatBotApp-AWS-Infra

Repository files navigation

Scalable AWS Infrastructure

Secure • Auto-Scaling • Well-Architected • Infrastructure as Code


Technology Stack

AWS Terraform Python GitHub Actions
Auto Scaling VPC CloudWatch RDS
EC2 S3 Secrets Manager Systems Manager


🔗 Navigation


📍 Overview

This project demonstrates key AWS Well-Architected Framework principles, built with Terraform, showcasing modern cloud practices including auto-scaling, security best practices, and automated deployments. The infrastructure follows AWS Well-Architected Framework principles with a focus on security, reliability, and cost optimization.

🏗️ Architecture Highlights:

Network Security: Multi-tier VPC with DMZ and secure zones, custom Network ACLs, and zero internet exposure for application instances.

Scalability: Auto Scaling Groups with Application Load Balancer, dynamic scaling policies, and multi-AZ deployment.

Security: AWS Secrets Manager integration, IAM roles with least privilege, VPC Flow Logs with security analytics.

Monitoring: CloudWatch dashboards with VPC Flow Log analytics and basic alerting.

Cost Management: Resource tagging and Auto Scaling Groups for cost optimization.



✨ Features

Feature Description
🏗️ Multi-Tier Architecture AWS VPC with public/private subnets, NAT Gateway, and Application Load Balancer. Auto Scaling Groups provide high availability and automatic scaling. Instance Connect Endpoints enable secure access without SSH key management.
🔒 Security Private subnets for application instances, VPC Flow Logs for network monitoring, Network ACLs for additional security, AWS Secrets Manager for credentials, and IAM roles with appropriate permissions.
📊 Monitoring & Analytics CloudWatch dashboards with VPC Flow Log analytics, security event visualization, and basic alerting. Deployment logs stored in S3 for audit trails.
🚀 CI/CD Automation GitHub Actions workflow with selective deployment to Auto Scaling instances, automated testing, and deployment validation. Infrastructure managed with Terraform modules.
💰 Cost Management Auto Scaling adjusts capacity based on demand, resource tagging for cost tracking, and right-sized instances for the workload.
🔄 Automated Operations GitHub Actions handles deployments, health checks via load balancer, and infrastructure as code with Terraform for consistency.

📂 Project Structure

.
├──  Terraform/                    # Infrastructure as Code
│   ├──  Setup_Scripts/             # Automated setup and configuration
│   ├──  modules/                   # Reusable Terraform modules
│   │   ├──  VPC/                   # Virtual Private Cloud & Networking
│   │   │   ├── vpc.tf                # VPC, Subnets, Route Tables
│   │   │   ├── network_acls.tf       # Network Access Control Lists
│   │   │   ├── flow_logs.tf          # VPC Flow Logs for security
│   │   │   └── vpc_endpoints.tf      # Instance Connect Endpoints
│   │   ├──  EC2/                   # Compute instances
│   │   ├──  AutoScaling/           # Auto Scaling Groups & Load Balancer
│   │   ├──  RDS/                   # Managed PostgreSQL database
│   │   ├──  S3/                    # File storage & logging
│   │   ├──  SecretsManager/        # Secure credential management
│   │   ├──  Monitoring/            # CloudWatch dashboards & alerts
│   │   └──  ResourceGroup/         # Resource organization & tagging
│   ├──  main.tf                    # Main infrastructure orchestration
│   ├──  variables.tf               # Configurable parameters
│   ├──  outputs.tf                 # Infrastructure outputs
│   └──  terraform.tfvars          # Environment configuration
├──  .github/workflows/             # CI/CD automation
│   └── deploy.yml                    # Automated deployment pipeline
├──  Application Files/             # Python application
│   ├── backend.py                    # FastAPI backend service
│   ├── chatbot.py                    # AI-powered application logic
│   └── requirements.txt              # Python dependencies
├──  selective-update.sh             # Selective deployment script
├──  Documentation/                 # Comprehensive guides         
│   └── GitHub-OIDC-Setup.md        # Security authentication setup
└──   Monitoring & Security/         # Operational excellence
    ├── Security dashboards           # Real-time security monitoring
    ├── Performance metrics           # Application performance tracking
    └── Cost optimization reports     # Resource utilization analytics

🚀 Getting Started

📚 Essential Resources:

🔗 AWS CLI Installation
🔗 Terraform Installation
🔗 GitHub OIDC Setup Guide

🔖 Prerequisites

  • AWS Account with proper access
  • AWS CLI configured (aws configure)
  • Terraform >= 1.0 installed
  • Git for version control

📋 Quick Setup

  1. Clone the repository:
git clone https://github.com/username/ChatBotApp-AWS-Infra
cd ChatBotApp-AWS-Infra

Set up Terraform backend (recommended if working in a team):

# Create S3 bucket for state management
aws s3 mb s3://your-terraform-state-bucket
# Configure backend in provider.tf

Custom Configuration:

# Copy and modify terraform.tfvars
cp terraform.tfvars.example terraform.tfvars
# Edit with your specific requirements
  1. Deploy infrastructure:
cd Terraform
terraform init
terraform plan
terraform apply

Note

For detailed setup instructions, prerequisites, and configuration guides, see the 📚 Wiki.

Contributions

🤝 Contributions are welcome!

⚖ License

This project is licensed under the MIT License.

For more details, see the LICENSE file.

Built with ❤️

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published