Project 5: Host a Dynamic Web Application on AWS with Terraform and EC2 (Part 3)
AOS Note
0:00 / 0:00
Project 5: Host a Dynamic Web Application on AWS with Terraform and EC2 (Part 3)
821 просмотр · Трансляция закончилась 8 мес. назад
AOS Note
27,5 тыс. подписчиков
821 просмотр · Трансляция закончилась 8 мес. назад
🗓️ Date: 12/13/2025
⏰ Time: 11:00 AM EST (U.S. – New York Time)
🎙️ Instructor: Azeez Salu
💻 Level: Intermediate → Advanced
⏱️ Duration: ~4 hours (with live Q&A)
🟢 Goal
Learn how to deploy and manage a production-ready, database-driven web application on AWS using Terraform Infrastructure as Code (IaC), enabling version-controlled, repeatable, and collaborative infrastructure deployments.
🧱 Session Outline
1️⃣ Architecture Overview
Review Project 2 architecture and introduce Infrastructure as Code with Terraform
2️⃣ Terraform Setup
🔹 Project folder structure and file organization
🔹 Configure AWS provider with region and default tags
🔹 Set up S3 backend with DynamoDB state locking
3️⃣ VPC & Networking
🔹 Create VPC with DNS hostnames enabled
🔹 Create Internet Gateway
🔹 Create public and private subnets across 2 AZs
🔹 Configure route tables and associations
4️⃣ NAT Gateway
🔹 Create Elastic IP and NAT Gateway
🔹 Configure private route table for outbound access
5️⃣ Security Groups
🔹 Create security groups for EICE, ALB, App Servers, Data Migration, and RDS
🔹 Configure proper ingress and egress rules
6️⃣ EC2 Instance Connect Endpoint
🔹 Create EICE for secure SSH access to private instances
7️⃣ Secrets Manager
🔹 Reference existing secret using data source
🔹 Parse secret JSON with jsondecode()
8️⃣ RDS Database
🔹 Create DB subnet group
🔹 Deploy MySQL RDS instance with credentials from Secrets Manager
9️⃣ IAM Role
🔹 Create IAM role with EC2 trust policy
🔹 Attach S3 access policy and create instance profile
🔟 ACM & SSL
🔹 Request ACM certificate with DNS validation
🔹 Create Route 53 validation records
1️⃣1️⃣ Application Load Balancer
🔹 Create ALB with target group
🔹 Configure HTTP to HTTPS redirect
🔹 Set up HTTPS listener with ACM certificate
1️⃣2️⃣ Route 53
🔹 Create A record alias pointing to ALB
1️⃣3️⃣ SNS Notifications
🔹 Create SNS topic and email subscription for scaling alerts
1️⃣4️⃣ Auto Scaling Group
🔹 Create launch template with user data script
🔹 Use templatefile() function for variable injection
🔹 Deploy ASG across private subnets
🔹 Attach to ALB target group
1️⃣5️⃣ Data Migration
🔹 Create EC2 instance for database migration
🔹 Configure migration script with templatefile()
1️⃣6️⃣ Deploy & Validate
🔹 Run terraform plan and terraform apply
🔹 Verify application via custom domain
1️⃣7️⃣ Wrap-Up & Q&A
End-to-end review, Terraform best practices, and live Q&A
💡 Skills You'll Learn
✅ Terraform fundamentals and syntax
✅ Provider and backend configuration
✅ Variables, locals, and outputs
✅ Data sources and resource references
✅ Templatefile function for user data scripts
✅ Implicit and explicit dependencies (depends_on)
✅ Remote state management with S3 and DynamoDB
✅ Multi-tier AWS architecture with Terraform
✅ Security group configuration in Terraform
✅ ACM certificate DNS validation with for_each
✅ Auto Scaling Group with launch templates
✅ Infrastructure as Code best practices
☁️ AWS Services Covered
VPC • Subnets • Internet Gateway • NAT Gateway • Route Tables • Security Groups • EC2 Instance Connect Endpoint • Secrets Manager • RDS (MySQL) • IAM Roles & Instance Profiles • ACM • Application Load Balancer • Target Groups • Route 53 • SNS • Auto Scaling Group • S3 (Backend) • DynamoDB (State Locking)
🛠️ Terraform Concepts Covered
Providers • Backend • Resources • Data Sources • Variables • Locals • Outputs • Dependencies • Lifecycle • Templatefile • For_each • Remote State
🧠 Real-World Use Cases
✅ Infrastructure as Code for version-controlled deployments
✅ Multi-environment deployments (dev, staging, prod)
✅ Team collaboration with remote state
✅ Disaster recovery with infrastructure code
✅ Cost management through easy environment teardown
✅ Audit and compliance through version control
✅ Enterprise DevOps workflows
🧰 Before You Join
✅ Complete Projects 1-4 or have AWS networking and EC2 knowledge
✅ AWS Free Tier account ready
✅ Terraform installed locally
✅ AWS CLI installed and configured
✅ Basic understanding of infrastructure concepts
✅ Code editor (VS Code recommended with Terraform extension)
🔔 Don't Miss It!
📅 Saturday, [Date] @ 11 AM EST
✅ Click "Notify Me"
✅ Subscribe & share with your network
#AWS #Terraform #DevOps #CloudComputing #AzeezSalu #InfrastructureAsCode #IaC #EC2 #RDS #ALB #AutoScaling #Route53 #VPC #CloudNative #YouTubeLive