在chaim已知的所有帐户和区域中搜索项目
awsfind的Python项目详细描述
awsfind公司
在chaim已知的所有帐户和区域中搜索实例
您应该能够为获得CrossAccountReadOnly
chaim凭据
每个帐户。在
脚本将依次获得每个帐户的chaimrro
权限,
使用该帐户后删除它们,然后使用
每个区域的线程查询所提到的每个特定实例的awsapi
在命令行上。在
找到所有实例后,脚本将停止并显示 结果。在
如果脚本需要访问每个帐户,它将需要大约13 只需几分钟。在
安装
克隆这个存储库,然后输入dir
git clone https://github.com/ConnectedHomes/awsfind.git
cd awsfind
如果您当前不使用poetry
,请使用它
可选:如果要开发此脚本,请安装依赖项
poetry install
可选项:可以使用从开发环境运行脚本
poetry run ifind
将脚本安装到用户本地python安装中
poetry build
vers=$(poetry version|sed 's/ /-/')
pip[3] install dist/${vers}*whl --user
现在在python用户目录中应该有一个脚本ifind
$ which ifind
/home/chris/.local/bin/ifind
$ ifind -h
ifind 0.3.0
ifind - AWS Instance Finder
Searches across all accounts and regions for instances using chaim credentials
search accounts in alphabetical order
ifind <instance-id> <instance-id> ... <instance-id>
to search accounts in random order (maybe quicker)
ifind -r <instance-id> <instance-id> ... <instance-id>
如果还没有,现在可以将.local/bin
目录添加到路径中
已经。在
使用
您可以使用poetry run ifind
或从该存储库直接运行
如上所述安装
$ ifind <instance-id> <instance-id> ... <instance-id>
上面的命令将按字母顺序搜索所有帐户, 在所有区域中搜索实例ID。在
如果您想随机搜索帐户(可能更快)
然后将-r
添加到命令中
$ ifind -r i-0b7ff13d0219b8b58 i-014c4b3c01153aef8
它显示它的当前进度
$ ifind i-0b7ff13d0219b8b58 i-014c4b3c01153aef8 i-09d8cfbb5fc425d26 i-0b42d2ae0db8cf231
ifind 0.3.0
Searching 119 accounts in 16 regions for 4 instances
7/119 1/4 biqlite-qa-uk
也就是说,在119个案例中的第7个账户中查找最后一个剩余的实例 我找到了另外3个人。在
一旦找到所有实例,它就会停止,并显示结果
Account Region Name Instance ID
------------------------------------------------------------------------------------------
biqlite-dev-uk eu-west-1 UNNAMED i-0b7ff13d0219b8b58
biqlite-dev-uk eu-west-1 UNNAMED i-014c4b3c01153aef8
biqlite-firmware eu-west-1 simplicity i-09d8cfbb5fc425d26
biqlite-qa-uk eu-west-1 UNNAMED i-0b42d2ae0db8cf231
search took 59s
- 项目
标签: