As of this month, October 2021, there’s a super easy way to export AWS security groups & rules to CSV! Yes, finally, go ahead jump up and down! Let’s settle down now, but seriously we have been waiting for a way to export one or more security groups to CSV and export just the AWS security group rules to CSV. This solution is just a click away!
Export all security groups to CSV
- Login to the AWS console, navigate to the EC2 service
- Select Security Groups
- Select the top most square checkbox
- You’ll see a big dropdown button that says, “Export Security Groups to CSV“, simply click it!
- Done, your CSV will automatically download.


Export one security group to CSV
- Login to the AWS console, navigate to the EC2 service
- Select Security Groups
- Select the square checkbox just for one or more security groups
- You’ll see a big dropdown button that says, “Export Security Groups to CSV“, simply click it!
- Done, your CSV will automatically download.

Export all inbound and outbound rules only to CSV
- Login to the AWS console, navigate to the EC2 service
- Select Security Groups
- Select the square checkbox just for one or more security groups
- You’ll see a big dropdown button that says, “Export Security Groups to CSV“, this time click on the triangle to view more options. This time select “Export security groups inbound/outbound rules to CSV“.
- Done, your CSV will automatically download.


Pro Tip The first two options does include the Tags in the export!
Interested in AWS infrastructure automation? Checkout my previous blogs on Terraform and Terragrunt! Subscribe below to learn more.
Post NotificationsGet the latest post directly in your inbox!