Skip to content

XxrzxX/ChatBotApp-AWS-Infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

 
 
 

Contributors