Get the details of unused resources present across regions in the AWS account
- This script provides a detailed overview of the number of unused resources present in the AWS account.
- It provides service-wise details of unused resources lying around in all the regions of the AWS account.
Currently, the script supports below AWS services :
- AWS::EC2::Volume
- AWS::EC2::EIP
- AWS::EC2::NetworkInterface
- AWS::EC2::VPC
- AWS::EC2::Subnet
- AWS::EC2::SecurityGroup
- AWS::ElasticLoadBalancing::LoadBalancer
- AWS::ElasticLoadBalancingV2::LoadBalancer
- AWS::IAM::User
- AWS::IAM::Group
- Workstation with Python version 3 and above
- AWS python-based SDK: boto3. Installation command:
- pip3 install boto3
- pandas framework and openpyxl for reporting operations (xlsx file).
Installation command(s):
- pip3 install pandas
- pip3 install openpyxl
- User credentials (Access Key Id and Secret Accces Key) of a user having atleast the Security Audit permission and above on the AWS account
- This script can be executed on a python compiler (AWS Cloudshell, Powershell, bash, any command line tool with python installed)
- Command:
- python ./unused_aws_resources.py --accessKey <AWS Access Key Id> --secretKey <AWS Secret Access Key>
- The script will provide a summarized count of all unused resources in the account.
- For a detailed view, the user can refer to the .xlsx file that will be generated by the script.