Skip to content

Zach-Maestas/secure-aws-architecture-capstone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Secure Multi-Tier Microservices App on AWS

This project deploys a secure, highly available, and scalable multi-tier architecture on AWS using Terraform. It simulates a production-grade environment for a Flask-based backend service integrated with Amazon RDS and S3. This serves as a capstone for the AWS Certified Solutions Architect โ€“ Associate certification.


๐ŸŒ Architecture Overview

Architecture Diagram

๐Ÿ” Key Features

  • VPC with public and private subnets across 2 Availability Zones
  • Application Load Balancer (ALB) in public subnets
  • EC2 Auto Scaling Group (ASG) for backend in private subnets
  • Amazon RDS (PostgreSQL) in private, isolated subnets
  • Amazon S3 Gateway Endpoint for private, secure object storage access
  • NAT Gateway for secure outbound access from private subnets
  • Route 53 for DNS resolution
  • Infrastructure as Code with modular, reusable Terraform

๐Ÿš€ Deployment Instructions

๐Ÿ“ Pre-requisites

  • Terraform >= 1.4
  • AWS CLI
  • AWS IAM user with sufficient permissions (VPC, EC2, RDS, S3, IAM, Route 53)

๐Ÿ”ง Setup

  1. Clone the repo:

    git clone https://github.com/your-username/secure-architecture-capstone.git
    cd secure-architecture-capstone/terraform
  2. Configure your variables by copying the example file:

    cp terraform.tfvars.example terraform.tfvars
  3. Initialize and apply:

    terraform init
    terraform plan
    terraform apply

๐Ÿ“ฆ Repo Structure

.
โ”œโ”€โ”€ diagrams/
โ”‚   โ””โ”€โ”€ architecture.png
โ”œโ”€โ”€ terraform/
โ”‚   โ”œโ”€โ”€ main.tf
โ”‚   โ”œโ”€โ”€ variables.tf
โ”‚   โ”œโ”€โ”€ outputs.tf
โ”‚   โ”œโ”€โ”€ backend.tf
โ”‚   โ””โ”€โ”€ terraform.tfvars.example
โ”œโ”€โ”€ flask-backend/
โ”‚   โ”œโ”€โ”€ app.py
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ””โ”€โ”€ requirements.txt
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE

๐Ÿ›ก๏ธ Security Considerations

  • EC2 instances are in private subnets with no direct internet access
  • ALB is the only public-facing component
  • RDS is deployed in isolated subnets with no internet route
  • NAT Gateway and S3 Gateway Endpoint allow controlled egress
  • IAM roles follow least privilege principles

๐Ÿงฐ Technologies Used

  • AWS VPC, EC2, ALB, RDS, S3, IAM, Route 53
  • Terraform
  • Flask (Python)
  • Docker

๐Ÿ”ฎ Future Improvements

  • Add CI/CD via GitHub Actions or CodePipeline
  • Integrate AWS Secrets Manager for DB credentials
  • Add WAF for ALB protection
  • Include CloudWatch Alarms and Logging

๐Ÿ“„ License

MIT License. See LICENSE file for details.

About

Capstone Project | AWS Certified Solutions Architect โ€” Associate ๐Ÿฅ‰

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published