Skip to main content

Resource Lister

Project description

Resource Lister (Multi Accounts)

Resource Lister is open source, interactive, python-based command line NO CODE utility. Resource Lister can generate list of AWS resources in single or multiple accounts in consumable CSV, or flatten JSON format in near real time. Resource Lister uses boto3 sessions and underlying List APIs to connect multiple configured child accounts and generate the list. Resource Lister also provides an option to output generated list to command line, file ,and s3. Multi Account Resource Lister can be configured to run from Cloud9, EC2 or from your local laptop.

Usage :

Resource lister utility is open source interactive command line tool for Developers, Solution Architect, Account Owners, Cloud Ops team or anyone who wants to simply list AWS Resources (for supported services) in an account or multiple accounts in consumable format like .csv without writing a code

Cloud Operation team can generate inventory of AWS resources in near real time accorss accounts and across regions for supported services without writing any code.

Operation team can identify which AWS accounts doesn't have budget setup.

Utility can help generate list in particular account/region and then you can filter particular type of resource like lambda function using python 2.6 version.

Resource list generated through utility is with 99% of attributes which python SDK sends back (Including configured Tags for the resource), Manually getting and formatting all the attributes and formatting in tabular/columnize format specifically .csv is tedious task utility does it for you.

How it works?

Run the utility Utility will start interactive Python session.

Step 1: Utility will prompt you to select the AWS Service for example S3,lambda or ec2 etc..

Step 2 : Utility will display number of supported functions for selected AWS service . You chose a perticular function for example **List of S3 Buckets **

Step 3 : Utility will prompt you to select AWS Account for which you want list of AWS resources, you can select ALL accounts by entering ALL or specify comma seperated list of accounts

Step 4 : If it's regional resource (example Lambda) you will promopt to select AWS Region ; you can select ALL for all the regions or specify comma seperated list of regions

Step 5: Finally, utility will generate the list of AWS Resources for selected Accounts and Regions send the output to File or S3 Bucket or Print on command prompt depending upon your configuration.

You can also run the utility in batch mode across all the services in selected AWS Account

Output

Prerequisite

  1. python3
  2. boto3

Installation

resource-lister is distributed on PyPI. Easiest way to install it is with pip Create a virtual environment (optional):

python3 -m venv .venv

Activate enviornment

source .venv/bin/activate

Install resource-lister

pip install resource-lister

Run Resource Lister Utility

Download main.py from github

https://github.com/awslabs/resource-lister/blob/main/install/main.py

Run main.py python file with below command

python3 main.py

Utility will open in command prompt

setup

Click on enviornment specific installation setup.

Help

General help

Supported Services and Functionality

Service Functions
accessanalyzer
  • 1.List of IAM Analyzers
  • 2.List of findings for specified IAM Analyzer
budgets
  • 3.List of budgets
cloudformation
  • 4.List of Cloudformation Stacks
cloudfront
  • 5.List of CloudFront distributions
  • 6.List of CloudFront functions
cloudtrail
  • 7.List of Cloud Trails
cloudwatch
  • 8.List of Cloudwatch Dashboards
  • 9.List of Cloudwatch Metrics
codecommit
  • 10.List of Code commit Repositories
dynamodb
  • 11.List of DynamoDB tables
ec2
  • 12.List of EC2 instances
  • 13.List of VPCs
  • 14.List of EBS volumes
  • 15.List of flow logs
  • 16.List of Network ACLs
  • 17.List of Route tables
  • 18.List of Security Groups
  • 19.List of Security Group Rules
  • 20.List of all the snapshots (self taken)
  • 21.List of Subnets
  • 22.List of Transit Gateways (TGW)
  • 23.List of VPC endpoints
  • 24.List of all the VPC Peering connections
  • 25.List of VPN connections
ecs
  • 26.List of ECS clusters
  • 27.List of ECS Services in specified ECS Cluster
  • 28.List ECS Tasks in specified ECS Cluster
efs
  • 29.List of EFS
eks
  • 30.Describe details of specified EKS Cluster
  • 31.List of EKS Clusters
  • 32.List EKS Fargate profiles in specified EKS Cluster
elbv2
  • 33.List of load balancers (Application, Network)
emr
  • 34.List of Provisioned EMR Clusters
  • 35.List of notebook executions.
  • 36.List of all the EMR Studios
  • 37.List of Instance fleets for specific EMR cluster
emr-serverless
  • 38.List of EMR Serverless applications
  • 39.List of EMR Serverless Job runs for specified EMR serverless application
iam
  • 40.List of IAM Roles
  • 41. List of Managed policies (AWS and Your owned)
  • 42. List of IAM users
kms
  • 43.List of KMS keys
lambda
  • 44.List of Lambda functions
  • 45.List of Lambda layers
organizations
  • 46. List of accounts in the organization
  • 47. List of Service Control Policies (SCP) in an organization
rds
  • 48.List of Aurora DB clusters
  • 49.List of provisioned RDS instances
  • 50.List of DB Security Groups
  • 51.List of Database Sanpshots
  • 52.List of Global aurora clusters
redshift
  • 53.List of Redshift clusters
redshift-serverless
  • 54.List of Redshift serverless namespaces
  • 55.List of Redshift serverless workgroups
route53
  • 56.List of all the Route53 CIDRs
  • 57.List of hosted zones(public and private)
  • 58.List of private hosted zones associated with specified VPC
route53domains
  • 59.List of Route53 Domains
  • 60.Info of Route53 Domain pricing
s3
  • 61.List of S3 buckets
  • 62.List of the objects in a S3 Bucket
sagemaker
  • 63.List of SageMaker Domains
  • 64.List of SageMaker Images
  • 65.List of SageMaker Models
  • 66.List of SageMaker Projects
  • 67.List of SageMaker User Profiles
sns
  • 68.List of SNS subscriptions
  • 69.List of SNS topics
sqs
  • 70.List of SQS queues

Pricing

Cloud9 Pricing: If you are using Cloud9 based setup.

License

This library is licensed under the Apache-2.0. See the LICENSE file.

Considerations

Resource-Lister creates boto3 sessions (master and child accounts) and invokes list APIs for the service you selected to list resources. These API calls will be applied to your account API Quotas. If you configured Resource-lister for multiple accoutns.You can use existing master and child account roles or create new roles. If you decided to create new roles, You need to run cloudformation template in child account , cloudformation template will create IAM role in child account with read only permissions,this role will be assumed by master account.
Utility currrenlty supports only 70 functions. If you are interested in addtional functions /features, Please raise issue.

Know issues

Improvements in error handling messages

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resource-lister-1.0.0.tar.gz (55.5 kB view hashes)

Uploaded Source

Built Distribution

resource_lister-1.0.0-py3-none-any.whl (77.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page