GithubHelp home page GithubHelp logo

aws-unused-analyzer's Introduction

UnusedAnalyzer With AWS SDK

This project will be a simple implementation of the UnusedAnalyzer using the AWS SDK for Rust.

What is UnusedAnalyzer

Here is an official blog post about UnusedAnalyzer.

And it's documentation is here.

Why This Project

After studying how the official UnusedAnalyzer works, I don’t quite understand why this feature was designed as a paid feature. After all, its core algorithm is to compare if a - b > c.

So I wanted to make a free version or it with AWS SDK.

How to run

It's a CLI tools, with help message:

cargo run -- --help
Usage: aws-unused-analyzer [OPTIONS]

Options:
  -r, --region <REGION>                        
  -a, --access-key <ACCESS_KEY>                
  -s, --secret-key <SECRET_KEY>                
  -u, --unused-access-age <UNUSED_ACCESS_AGE>  [default: 90]

Instead of running with source code which require cargo toolchain, you can also run with release binary:

aws-unused-analyzer --help

With Arguments Or With Environment Variables

aws-unused-analyzer --a <ACCESS_KEY> --s <SECRET_KEY> -u 30

It will use the arguments first, if not provided, it will use the environment variables.

how to set environment variables for AWS SDK: doc

Wait for a while(depends on the number of IAM Users and Roles), you will get the output file in the current directory.

echo unused_findings.json

{
  "resource": "arn:aws:iam::1234567890:role/TestRole",
  "resource_type": "AwsIamRole",
  "resource_owner_account": "1234567890",
  "id": "99f66ff9-5763-4e8f-9284-f2aebf3df753",
  "finding_details": [
    {
      "UnusedPermissionDetails": {
        "actions": null,
        "service_namespace": "s3",
        "last_accessed": "2024-02-29T12:37:10Z"
      }
    }
  ],
  "finding_type": "UnusedPermission"
}

Roadmap

  • Implement the account unused analyzer generating same output as the official one.
  • Implement the finding recommendation for UnusedPermission of Role. (updated at 6.18 re:Inforce 2024)
  • Implement the organization unused analyzer feature (using user defined role maybe).
  • ...to be finded out.

License

This project is licensed under the MIT License - see the LICENSE file for details.

aws-unused-analyzer's People

Contributors

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