Mause / DevOps Team
v0.0.2
This script lists resources for various AWS services in a specified AWS region. The script uses AWS CLI commands to query specific services and display their resources.
The script currently supports the following AWS services:
- EC2
- S3
- RDS
- DynamoDB
- Lambda
- CloudFront
- EBS
- ELB
- CloudWatch
- SNS
- SQS
- Route53
- VPC
- CloudFormation
- IAM
- AWS CLI must be installed on your system.
- AWS CLI must be configured with the necessary IAM permissions to access the desired AWS resources.
Run the script with the following syntax:
./aws_resource_list.sh <service_name>
-🔄 Script Flow ✅ Argument Check Ensures two arguments (region and service_name) are provided.
✅ AWS CLI Check Verifies that the AWS CLI is installed and configured.
✅ Service Execution Executes the appropriate AWS CLI command to list resources based on the service name.
🖥️ EC2 — List EC2 instances
🪣 S3 — List all S3 buckets
🗄️ RDS — List RDS DB instances
🧮 DynamoDB — List DynamoDB tables
🌀 Lambda — List Lambda functions
🌍 CloudFront — List distributions
aws cloudfront list-distributions --region
💾 EBS — List EBS volumes
🔁 ELB — List load balancers
📊 CloudWatch — List alarms
📣SNS — List topics
📬SQS — List queues
🧭 Route 53 — List hosted zones
🕸️ VPC — List VPCs
aws ec2 describe-vpcs --region
🧱 CloudFormation — List stacks
aws cloudformation list-stacks --region
- aws iam list-users
If AWS CLI is not installed or configured, the script exits with an error.
If an unsupported service is provided, the script displays a list of supported services.
💡 Tip: Make sure your AWS credentials are correctly configured using aws configure.
📄 License MIT License
