How divsh54321/url-shortener-infra works
This repository provisions and deploys the URL shortener on AWS: Terraform creates the network, managed data services, app instances, and load balancer; Ansible installs and runs the app container on both instances. The principal request path is Internet → ALB → app servers → Postgres/Redis. The README documents these connections and deployment behavior; most Terraform and Ansible source was not sampled, so the graph reflects documented relationships rather than inspected implementation details. The sampled encoding.py is not part of this infrastructure workflow.
Main entry points: vpc.tf VPC and subnets · app_servers.tf App servers · playbook.yml Ansible playbook · security_groups.tf Security groups
Components 13
Network and access
- VPC and subnets
vpc.tf - Security groups
security_groups.tf - AWS provider
provider.tf
Persistent services
- Postgres RDS
database.tf - Redis cache
database.tf
Application serving
- App servers
app_servers.tf - Application load balancer
alb.tf - URL shortener container
Deployment
- Server inventory
inventory.ini - Ansible playbook
playbook.yml - Terraform outputs
outputs.tf
Other components
- Internet clients
- Deployment operator
Connections 18
- Internet clients → Application load balancer: sends requests
README.md - Application load balancer → App servers: routes traffic
README.md - App servers → Postgres RDS: uses database
README.md - App servers → Redis cache: uses cache
README.md - Deployment operator → Ansible playbook: runs deployment
README.md - Server inventory → Ansible playbook: lists targets
README.md - Ansible playbook → App servers: configures servers
README.md - Ansible playbook → URL shortener container: runs container
README.md - URL shortener container → App servers: runs on
README.md - Terraform outputs → Ansible playbook: provides endpoints
README.md - AWS provider → VPC and subnets: provisions with AWS
- VPC and subnets → Security groups: contains network
README.md - VPC and subnets → Postgres RDS: hosts privately
README.md - VPC and subnets → Redis cache: hosts privately
README.md - VPC and subnets → App servers: hosts publicly
README.md - VPC and subnets → Application load balancer: hosts publicly
README.md - Security groups → Postgres RDS: restricts access
README.md - Security groups → Redis cache: restricts access
README.md