Ad space (banner)
AD

Got the fundamentals? A structured AWS course is a fast way to level up.

Find AWS courses on Udemy

Affiliate link. Costs you nothing extra.

☁️AWS Lessons
Lesson 31 / 41

Listing Security Groups with aws ec2 describe-security-groups

When you want to review the firewall rules in place, use aws ec2 describe-security-groups. It lists every group and its rules.

The syntax is aws ec2 describe-security-groups.

Running it returns each group's ID, name, description and the inbound and outbound rules attached to it.

A common stumble is overlooking the default group, which every VPC has and which instances join if you don't specify otherwise.

In real work, it is used in security reviews to find rules that are open more widely than intended.

AWS
Try it (type this into the pseudo terminal)
aws ec2 describe-security-groups

🧑‍💻 You can type this command into the AWS pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)