Git Product home page Git Product logo

awsretriever's Introduction

AWSRetriever

Lists all resources in a AWS account.

Build Status

Features

  • Supports over 390 APIs from over 70 services, all regions

  • Objects saved in JSON format

  • Define and save profiles for specific service queries

  • Runs a single operation

  • CLI Support

Overview

AWSRetriever scans sets of predefined AWS APIs, saved in "profile" files.

Profiles are json based files, holding a (potentially) very long list of operations to run. AWSRetriever is shipped with a default.profile.js, that holds a generic wide-variety of calls.

The profile is scanned when choosing "Full Scan" from the side-bar menu, or using the command-line parameter -p (combined with -r)

Profiles can be saved & loaded. The default profile loaded is defined in the configuration file.

A typical use-case is to define and test profiles for various AWS resources views and then use the CLI to periodically retrieve the items from AWS.

Command-line interface

To export all items provided in my ec2.profile.js, and save them in object.json, use the following switches:

>AWSRetriever.exe -r -p ec2.profile.js -o objects.json
AWS Retriever
Using profile: 'ec2.profile.js'
Writing to 'objects.json'
Queueing from 'default' profile...1825 operations queued.
Scanning...

To export all items to myobjects.json using the default profile and settings:

>AWSRetriever.exe -r -o myobjects.json
AWS Retriever
Using profile: 'default.profile.js'
Writing to 'myobjects.json'
Queueing from 'default' profile...1825 operations queued.
Scanning...
EC2 DescribeInternetGateways ap-northeast-1: 1 items retrieved
EC2 DescribeInternetGateways ap-south-1: 1 items retrieved
EC2 DescribeInternetGateways ap-northeast-2: 1 items retrieved
EC2 DescribeInternetGateways ca-central-1: 1 items retrieved
.
.
.

The resulting myobjects.json file, holds a JSON array with the following structure:

[
    {
        // the type of the object listed:
        "Type": "InternetGateway",
        // the service it was retrieved from:
        "Service": "EC2",
        // the region:
        "Region": "ap-northeast-2",
        //the object itself, will change according to the object:
        "Source": {
            "Attachments": [
                {
                    "State": {
                        "Value": "available"
                    },
                    "VpcId": "vpc-e2e9f18a"
                }
            ],
            "InternetGatewayId": "igw-0562ad6d",
            "OwnerId": "000000000000",
            "Tags": []
        }
    },
    {
    // more objects...
    }
]

Profile Record

Each profile record holds:

 {
    // AWS service to execute
    "ServiceName": "EC2",
    // Specific API to execute:
    "Name": "DescribeInternetGateways",
    // A list of regions to call:
    "Regions": "ap-northeast-1 ap-northeast-2 ap-south-1 ap-southeast-1 ap-southeast-2 ca-central-1 eu-central-1 eu-north-1 eu-west-1 eu-west-2 eu-west-3 sa-east-1 us-east-1 us-east-2 us-west-1 us-west-2",
    // if false, this API is skipped
    "Enabled": true,
    // if this API supports paging, this value will be the page size for each request.
    "PageSize": 18
}

Download & Run

Download the latest for Windows or Linux.

Windows

  1. Requires .NET
  2. Create a folder AWSRetriever
  3. Unzip to folder.
  4. Run AWSRetriever.exe

Linux / Ubuntu

Make sure mono is installed:

sudo apt-get install mono-runtime
mkdir awsretriver
cd awsretriver
unzip path_to_downloaded_awsretriver.zip 
mono AWSRetriver.exe

Screenshots

Main Screen with some data

main-screen

Profile Editor

profile-editor

Launching a specific API

single-operation

Thanks

awsretriever's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

awsretriever's Issues

Magic user config.js missing

First of all, AWSRetriever is a really nice and nifty tool. Congratulations!

There was some magic involved with setting up config.js. The option "-c" is not documented, and I could not find a description of the config file syntax. It would be helpful to include that in the documentation, or to default to accessing some ~/.aws/config file instead.

Enhancement Request: Export List

IT would be nice to be able to export the objects found list instead of just the json. For me, I was looking for a pretty simple list of what's there, and didnt need the rest of the data.

thanks for the tool!

User policy

Hi

Do you have an example of the most restricted IAM policy that the complete scan will run on?

Regards
Stephan Thierry

Access via role in Shell

Hi Denny,
thanks for the great Tool! I encountered a problem when trying to access via role.
First I got the Error Message about the missing AWSSDK.SecurityToken.
AWSRetriever_Error

I could resolve this by manually copying the dll to the AWSRetriever folder. Then it works in the GUI.

But what I really wanted to do was to use your tool via shell.
It's hard to get it to run as role, but with the -c option I was able to. AwsUser set to role name as in the AWS CLI environment.
That way it starts running, till it hits this exception:

Unhandled Exception: System.ObjectDisposedException: Cannot access a closed file. at System.IO.__Error.FileNotOpen() at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count) at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count) at System.IO.TextWriter.WriteLine(String value) at Retriever.ConsoleScanner.Progress_ProgressChanged(Object sender, OperationResult e) at System.Progress1.InvokeHandlers(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()`

Maybe you can have a look at it?
Thank you so much!
Basti

License file

Hi there. This is an awesome project. Can you add a license?

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.