Code Monkey home page Code Monkey logo

aws-usage-tracker's Introduction

aws-usage-tracker

To track AWS usage using a bash script, you can use AWS CLI (Command Line Interface) which provides a command-line interface for interacting with AWS services.

This script uses the AWS CLI to retrieve the following information:

EC2 instance count: Uses the aws ec2 describe-instances command to list all EC2 instances in the specified region, and then counts the number of instance IDs returned using the wc command.

S3 bucket count and total size: Uses the aws s3api list-buckets command to list all S3 buckets in your account, and then counts the number of bucket names returned using the wc command. Then uses the aws s3api list-objects command to retrieve the total size of objects in one of your S3 buckets (replace with the name of your bucket).

Lambda function count: Uses the aws lambda list-functions command to list all Lambda functions in the specified region, and then counts the number of function names returned using the wc command. You can modify this script to track usage for other AWS services by changing the AWS CLI commands and options accordingly. Remember to replace with the name of your S3 bucket.

aws-usage-tracker's People

Contributors

themanoz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.