cloud-resource-logger

1.2.2 • Public • Published

Cloud-Resource-Logger

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.

Installation

To install cloud-resource-logger, you can use npm. For global installation, run:

npm install -g cloud-resource-logger

Usage

To use cloud-resource-logger, you'll need to provide AWS credentials and specify the service you want to query.

Start Environment

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.

Stop Environment

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.

List EC2 Instances

To list all EC2 instances, use the following command:

cloud-resource-logger list --service ec2

List S3 Buckets

To list all S3 buckets, use the following command:

cloud-resource-logger list --service s3

List Lambda Functions

To list all Lambda functions, use the following command:

cloud-resource-logger list --service lambda

List DynamoDB Tables

To list all DynamoDB tables, use the following command:

cloud-resource-logger list --service dynamodb

List IAM Users and Policies

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.

List RDS Instances

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.

List ECS Clusters

To list ECS clusters, use the following command:

cloud-resource-logger list --service ecs

List EKS Clusters

To list EKS clusters, use the following command:

cloud-resource-logger list --service eks

Commands

  • 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.
  • help: Show this help message.

Example

$ 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 stop
Environment stopped and AWS credentials removed.

Configuration

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.

Contributing

Feel free to contribute to the project by opening issues or submitting pull requests. See contributing guidelines

Contact

For any questions or feedback, please reach out to Prathamesh Inde at prathameshinde86@gmail.com.

Key Sections Included

  • 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.

File Structure and Functionality

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!

Package Sidebar

Install

npm i cloud-resource-logger

Weekly Downloads

333

Version

1.2.2

License

MIT

Unpacked Size

63.7 kB

Total Files

20

Last publish

Collaborators

  • inde09