Coder Social home page Coder Social logo

aws-access-keys-auditor's Introduction

AWS IAM Access Key Audit Script

Overview

This Python script audits AWS IAM users' access keys across an AWS account. It identifies active access keys that have not been used for more than 90 days. This helps in enhancing security by monitoring and managing credentials. It scans all keys against all users. Most scripts would check just the first access key. This one covers the case when one user has multiple access keys.

Features

  • Multithreading: Utilizes Python threading for concurrent processing of multiple IAM users, improving performance.
  • Access Key Status Check: Audits only active access keys.
  • Usage Tracking: Reports the number of days each active key has been unused.

Usage

Simply run the script in your Python environment. Ensure that your AWS credentials are set in the environment variables before execution.

  • Use simpleauditor_IAM.py if you have IAM keys. python3 simpleauditor_IAM.py
  • Use simpleauditor_SSO.py if you have SSO credentials. python3 simpleauditor_SSO.py

Prerequisites

  • Python 3.x
  • Boto3 library
  • AWS credentials (Access Key ID, Secret Access Key, and optionally Session Token) set as environment variables.

Installation

  1. Install Python 3.x: Ensure Python 3.x is installed on your system. Download from Python's official site.

  2. Install Boto3: Use pip to install the Boto3 library.

    pip install boto3
    
  3. Set AWS Credentials: Set your AWS credentials as environment variables.

    export AWS_ACCESS_KEY_ID="your_access_key_id"
    export AWS_SECRET_ACCESS_KEY="your_secret_access_key"
    export AWS_SESSION_TOKEN="your_session_token"  # Optional
    
    

aws-access-keys-auditor's People

Contributors

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