Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Organizations support? #144

Closed
iainelder opened this issue Dec 2, 2021 · 5 comments
Closed

AWS Organizations support? #144

iainelder opened this issue Dec 2, 2021 · 5 comments
Labels
wontfix This will not be worked on

Comments

@iainelder
Copy link

First of all, thanks for developing this awesome tool. I just discovered it and it looks really useful for filling in the gaps in AWS Config's coverage.

As far as I can tell from the docs, the scope of each execution is a single AWS account.

Would you consider adding support for multiple accounts or even a whole organization?

I often need to run inventory checks for a single resource type across all accounts in my AWS organizations. The organizations I manage are in the order of hundreds or thousands of accounts, so checking each one by one is impractical.

Ideally I'd like to be able to connect to the organization management account and collect inventory from all accounts in the organization including the management account itself.

Before I was aware of aws-recon, I built a tool called aws-org-inventory that collects inventory from all the organization member accounts. It mostly meets my needs, but it's still expiremental; far less mature than aws-recon.

If aws-recon could support this use case, I'd happily adopt it as my go-to tool for collecting organization inventory.

To get an idea of what I mean, here's my proof of concept (written in Python): https://github.com/iainelder/aws-org-inventory

The clever part of connecting to all the member accounts is actually due to the Botocove library: https://github.com/connelldave/botocove

@joshlarsen
Copy link
Owner

Hi @iainelder, I think it's a great idea. I can't promise a timeline, but it would make for a great feature enhancement. Would you be available to help test it?

@iainelder
Copy link
Author

iainelder commented Dec 4, 2021

Glad to hear that. Sure, sign me up for testing! I have a small personal org to try things in.

In the meantime, I may experiment with a script that generates the profiles for the member accounts and drives aws_recon to run on each one.

I believe the API thottling limits are per account, so it may be possible to run a few aws_recon processes in parallel in this way.

If I get any useful results I'll share them here.

@stale stale bot added the wontfix This will not be worked on label Jan 6, 2022
Repository owner deleted a comment from stale bot Jan 6, 2022
@stale stale bot removed the wontfix This will not be worked on label Jan 6, 2022
@iainelder
Copy link
Author

I wrote some experimental code that can drive aws_recon as I described.

Once you have a CLI config file with one profile for each account in your organization, it's quite straightforward to execute aws_recon once with each profile. You can use something like GNU Parallel to make it go faster.

Example here in bash:

https://github.com/iainelder/parallel_recon/blob/c1a72da8daf0867577232ac11e6db7e8b6023ac0/parallel_recon

Writing such a profile file is more complicated than I had first thought. You need to treat the management account separately and copy the existing config for it.

Example here in Python:

https://github.com/iainelder/parallel_recon/blob/c1a72da8daf0867577232ac11e6db7e8b6023ac0/main.py

The code for reading and writing the existing profiles depends on some internal methods of Python's awscli and botocore packages to do that. I'm less familiar with the Ruby SDK for AWS, but the same would be possible one way or another.

@stale
Copy link

stale bot commented Feb 6, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Feb 6, 2022
@joshlarsen joshlarsen removed the wontfix This will not be worked on label Feb 11, 2022
@stale
Copy link

stale bot commented Mar 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Mar 17, 2022
@stale stale bot closed this as completed Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants