Interview Prep/Networking/VPC & Network Architecture

Why should databases never sit in public subnets?

BeginnerProductionVPC & Network Architecture
Answer

A database exposed to the internet is only one weak password or unpatched CVE away from a breach. Put it in private subnets with no IGW route, restrict its security group to the app tier, and require TLS.

For admin access use SSM port forwarding, a VPN or an ephemeral bastion rather than opening the DB port.

All Networking questions Roadmap: Networking for DevOps

More on VPC & Network Architecture