Skip to main content

AWS Infrastructure

This document provides an overview of the AWS cloud infrastructure for wastelog-vpc, deployed in the eu-central-1 region. The architecture is designed to provide high availability, secure network segmentation, and isolated resources for production and development environments.

Architecture Overview​

The network is separated into public and private subnets across two Availability Zones (AZs).

  • Region: eu-central-1 (Frankfurt)
  • VPC Name: wastelog-vpc
  • CIDR Block: 10.0.0.0/16

Diagram​

AWS Diagram

Network Architecture​

Availability Zones (AZs)​

The infrastructure spans across two AZs: eu-central-1a and eu-central-1b.

Ingress & Routing​

  • Internet Gateway (IGW): Provides external internet connectivity to the VPC.
  • Application Load Balancer (ALB): Receives external HTTP/S traffic and routes it to the prod-ec2 and dev-ec2 instances in the private subnets.
  • NAT Gateway: Resides in Public Subnet B (Public IP: 3.127.89.183). Allows outbound internet access for both prod-ec2 and dev-ec2 in the private subnets.

Compute Resources (EC2)​

Bastion Host (bastion-ec2)​

  • Location: Public Subnet
  • Purpose: Accepts inbound SSH traffic (port 22) from the internet and provides SSH access to the internal prod-ec2 and dev-ec2 instances.
  • Security: Acts as the single entry point for accessing private instances from the external network.

Production Server (prod-ec2)​

  • Location: Private Subnet
  • Running Services: NestJS application

Development Server (dev-ec2)​

  • Location: Private Subnet
  • Running Services: NestJS application, MySQL, and Redis (local)

Databases & Caching​

Relational Database (Amazon RDS)​

  • Type: Multi-AZ Amazon RDS
  • Location: Private Subnet
  • Connections: Accessible only from prod-ec2.

Caching Layer (Amazon ElastiCache)​

  • Type: Multi-AZ Amazon ElastiCache
  • Location: Private Subnet
  • Connections: Accessible only from prod-ec2.

Storage & Monitoring​

Amazon S3​

Two distinct S3 buckets are utilized:

BucketConnected ServerPurpose
Prod S3prod-ec2Production object storage
Dev S3dev-ec2Development object storage

AWS CloudWatch​

  • CloudWatch Agents are deployed on both prod-ec2 and dev-ec2 to collect logs and metrics.