Introduction
Security groups act like virtual firewalls for your cloud servers. They control who can talk to your servers and what kind of traffic is allowed. This helps keep your servers safe from unwanted access.
When you want to allow your web server to accept traffic only on port 80 and 443 from the internet.
When you need to restrict database access so only your application servers can connect to it.
When you want to block all traffic except from specific IP addresses for extra security.
When you want to quickly change access rules without touching the server itself.
When you want to separate different parts of your system with different access rules.