Before installing AWS Security Group Auditor, ensure you have the following:
Python 3.x: The tool requires Python 3 or higher
AWS Account: An active AWS account with security groups to audit
AWS Permissions: IAM permissions to read security groups and various AWS services
You’ll need read permissions for EC2, ELB, RDS, ECS, EKS, and other AWS services the tool audits. For deletion capabilities, you’ll also need ec2:DeleteSecurityGroup permission.
The tool uses boto3’s standard credential chain to authenticate with AWS. You need to configure your AWS credentials before running the auditor.
1
Choose a credential method
Boto3 supports multiple authentication methods. Choose the one that best fits your environment:
AWS CLI configuration files (recommended for local development)
Environment variables
IAM roles (recommended for EC2 instances)
AWS SSO
2
Configure using AWS CLI (recommended)
The easiest method is using the AWS CLI to configure credentials:
aws configure
Enter your credentials when prompted:
AWS Access Key ID [None]: YOUR_ACCESS_KEYAWS Secret Access Key [None]: YOUR_SECRET_KEYDefault region name [None]: us-east-1Default output format [None]: json
This creates credential files at ~/.aws/credentials and ~/.aws/config.
3
Alternative: Use environment variables
You can also set credentials using environment variables: