Code Monkey home page Code Monkey logo

list-ec2's Introduction

list_ec2

List and print all EC2 instances in an AWS account using AWS API keys.

Description

The list_ec2 tool can be used to create timestamped CSV reports about EC2 instances in an AWS account. This is helpful if you are the maintainer of multiple EC2 subscriptions and want to ensure the EC2 instances are properly secured. Using the reports it becomes easy to review which instances are running on which external IP's for example without having to visit the AWS console.

Example output is shown below;

alt tag

Usage

The tool has been tested on Debian and MacOS, but should work on other platforms too. Besides Python, install the following package using 'python-pip';

$ pip install boto3 

Next, ensure your ~/.aws/ directory contains valid AWS credentials, which you can create using the AWS CLI tool. Set the profile name and region within the script to ensure your resources can be printed.

Results of the scan are shown on screen, stored in "ec2.csv" in the current directory and a timestamped copy of the results file is stored in folder 'logs'. You could use i.e. Splunk to monitor the logs directory over time and create security use cases in case i.e. an EC2 instance is launched without the proper security group applied.

Contact

For any questions or fixes, please reach out to @marekq!

list-ec2's People

Contributors

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