cloud-resource-logger is a CLI tool for listing AWS resources such as EC2 instances, S3 buckets, Lambda functions, and DynamoDB tables. It prompts for AWS credentials and displays information about the specified resources.
To install cloud-resource-logger
, you can use npm. For global installation, run:
npm install -g cloud-resource-logger
You can find the cloud-resource-logger
package on npm at the following link:
NPM Package: cloud-resource-logger
To use cloud-resource-logger
, you'll need to provide AWS credentials and specify the service you want to query.
To start the environment and save AWS credentials, use the following command:
cloud-resource-logger start
This command will prompt you to enter your AWS credentials and save them for use with subsequent commands.
To stop the environment and remove saved AWS credentials, use the following command:
cloud-resource-logger stop
This command will remove the saved credentials, ensuring that subsequent commands prompt for credentials again.
To list all EC2 instances, use the following command:
cloud-resource-logger list --service ec2
To list all S3 buckets, use the following command:
cloud-resource-logger list --service s3
To list all Lambda functions, use the following command:
cloud-resource-logger list --service lambda
To list all DynamoDB tables, use the following command:
cloud-resource-logger list --service dynamodb
To list IAM users and their attached policies, use the following command:
cloud-resource-logger list --service iam
This will print all IAM users along with their attached policies.
To list RDS instance details, use the following command:
cloud-resource-logger list --service rds
This will print information about available RDS instances, clusters, and other related details.
To list ECS clusters, use the following command:
cloud-resource-logger list --service ecs
To list EKS clusters, use the following command:
cloud-resource-logger list --service eks
To list CloudWatch alarms, use the following command:
cloud-resource-logger list --service cloudwatch
To list CloudFormation stacks, use the following command:
cloud-resource-logger list --service cloudformation
To list Route 53 hosted zones, use the following command:
cloud-resource-logger list --service route53
To list SNS topics, use the following command:
cloud-resource-logger list --service sns
To list SES identities, use the following command:
cloud-resource-logger list --service ses
To list load balancers, use the following command:
cloud-resource-logger list --service elb
To list Kinesis streams, use the following command:
cloud-resource-logger list --service kinesis
-
start
: Start the environment and save AWS credentials. -
stop
: Stop the environment and remove saved AWS credentials. -
list --service <service>
: Specify the AWS service you want to query. Valid options are:ec2
- Lists all EC2 instances.s3
- Lists all S3 buckets.lambda
- Lists all Lambda functions.dynamodb
- Lists all DynamoDB tables.iam
- Lists IAM users and their attached policies.rds
- Lists RDS instances and clusters.ecs
- Lists ECS clusters.eks
- Lists EKS clusters.cloudwatch
- Lists CloudWatch alarms.cloudformation
- Lists CloudFormation stacks.route53
- Lists Route 53 hosted zones.sns
- Lists SNS topics.ses
- Lists SES identities.elb
- Lists load balancers.kinesis
- Lists Kinesis streams.
-
help
: Show this help message.
$ cloud-resource-logger start
Enter AWS Access Key ID: [Your Access Key ID]
Enter AWS Secret Access Key: [Your Secret Access Key]
Enter AWS Region: [Your AWS Region]
Environment started and AWS credentials saved.
$ cloud-resource-logger list --service ec2
Active EC2 Instances:
[ ... list of instances ... ]
$ cloud-resource-logger list --service s3
S3 Buckets:
[ ... list of buckets ... ]
$ cloud-resource-logger list --service iam
IAM Users and Policies:
[ ... list of users and attached policies ... ]
$ cloud-resource-logger list --service rds
RDS Instances:
[ ... list of RDS instances ... ]
$ cloud-resource-logger list --service ecs
ECS Clusters:
[ ... list of ECS clusters ... ]
$ cloud-resource-logger list --service eks
EKS Clusters:
[ ... list of EKS clusters ... ]
$ cloud-resource-logger list --service cloudwatch
CloudWatch Alarms:
[ ... list of alarms ... ]
$ cloud-resource-logger list --service cloudformation
CloudFormation Stacks:
[ ... list of stacks ... ]
$ cloud-resource-logger list --service route53
Route 53 Hosted Zones:
[ ... list of hosted zones ... ]
$ cloud-resource-logger list --service sns
SNS Topics:
[ ... list of topics ... ]
$ cloud-resource-logger list --service ses
SES Identities:
[ ... list of identities ... ]
$ cloud-resource-logger list --service elb
Load Balancers:
[ ... list of load balancers ... ]
$ cloud-resource-logger list --service kinesis
Kinesis Streams:
[ ... list of streams ... ]
$ cloud-resource-logger stop
Environment stopped and AWS credentials removed.
You will be prompted to enter the following AWS credentials:
- AWS Access Key ID
- AWS Secret Access Key
- AWS Region
These credentials are used to authenticate with AWS and fetch the relevant resource information.
Feel free to contribute to the project by opening issues or submitting pull requests. See contributing guidelines
For any questions or feedback, please reach out to Prathamesh Inde at [email protected].
- Installation: How to install the CLI tool.
- Usage: Instructions on how to use the tool with example commands.
- Commands: Detailed description of the available commands and their options.
- Example: Example usage of the commands.
- Configuration: Explanation of what credentials are required.
- License: Information about the license.
- Contributing: Instructions for contributing to the project. See contributing guidelines
- Contact: How to contact you for support or feedback.
For a detailed overview of the source code, including the file structure and functionality of each component, refer to the File Structure.
Let me know if there are any further changes you’d like!
Thank you for using cloud-resource-logger
!