Giter Club home page Giter Club logo

aws-account-list's Introduction

AWS Account List

Generates a list of all AWS accounts registered in an AWS Organizations account.

Install as a CLI tool

  1. You must have the Golang toolchain installed first.

    brew install go
  2. Add $GOPATH/bin to your $PATH environment variable. By default (i.e., without configuration), $GOPATH is defined as $HOME/go.

    export PATH="$PATH:$GOPATH/bin"
  3. Once you've done everything above, you can use go get.

    go get -u github.com/northwood-labs/aws-account-list

Usage as CLI Tool

Examples assume the use of AWS Vault and AWS Identity Center.

Gets a list of AWS accounts that are part of the AWS Organization as JSON.

aws-account-list --help

Read directly from the AWS Organizations management account.

aws-vault exec management-account -- aws-account-list

Assume the AWS_ORG_ROLE IAM role first, then read the AWS Organizations management account using that IAM role.

AWS_ORG_ROLE="arn:aws:iam::0123456789012:role/OrganizationReadOnlyAccess"
aws-vault exec management-account -- aws-account-list

Usage as Library

This can also be used as a library in your own applications for generating a list in-memory. The library should fetch data for accounts asynchronously for better performance, but does not yet. This has been tested on AWS Organizations up to ~200 accounts.

import "github.com/northwood-labs/aws-account-list/accountlist"

See main.go, which implements this library to produce this very same CLI tool.

aws-account-list's People

Contributors

skyzyx avatar step-security-bot avatar

Stargazers

 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.