awsfind
searches across all accounts and regions known to chaim for the instance(s)
You should be able to obtain CrossAccountReadOnly chaim credentials for
every account.
The script will obtain chaim rro permissions for each account in turn,
deleting them when it has finished with that account, and then, using a
thread per region query the AWS API for each specific instance mentioned
on the command line.
Once all instances have been found the script stops and displays the results.
Should the script need to visit every account it will take approx. 13 minutes to do so.
install
Clone this repository, and enter the dir
git clone https://github.com/ConnectedHomes/awsfind.git
cd awsfind
If you don't currently use poetry get it with
pip[3] install poetry --user
Optional: If you intend to develop this script install the dependencies
poetry install
Optional: the script can be run from the development environment with
poetry run ifind
Install the script to the users local python installation
poetry build
vers=$(poetry version|sed 's/ /-/')
pip[3] install dist/${vers}*whl --user
You should now have a script ifind in your python user directories
$ 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>
You can now add your .local/bin directory to your PATH if you haven't
already.
Usage
You can run directly from this repository with poetry run ifind or
install it as above
$ ifind <instance-id> <instance-id> ... <instance-id>
The above command will search through all accounts in alphabetical order, searching all regions for the instance ids.
If you want to search accounts in a random order (which maybe quicker)
then add -r to the command
$ ifind -r i-0b7ff13d0219b8b58 i-014c4b3c01153aef8
It displays it's current progress
$ 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
i.e. looking in the 7th of 119 accounts for the last remaining instance id, having found 3 others.
Once it has found all the instances it stops, displaying the results
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
Metadata
Release files for awsfind 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| awsfind-0.4.0.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awsfind-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / awsfind-0.4.0.tar.gz
| Download URL | awsfind-0.4.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70839642c72adfcadf1029c4239b52478db78c768eaa5cf6dd902d6af15653d1
|
|
BLAKE2b-256 checksum How to use checksums |
5b1126d358d8c9d3f1c7bae4e34168702a8e4aff848c044e9e3f6c7a2eb73a41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.1 Linux/5.5.8-1-MANJARO
|
Release files / awsfind-0.4.0-py3-none-any.whl
| Download URL | awsfind-0.4.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5c08e7d5d17400edeb1f1e097af9e59541af14f31b576139f41f473d46bd252
|
|
BLAKE2b-256 checksum How to use checksums |
ed210c64ea3627e00c64fe0698aaf42cde1ebca49b1aab213ff08abb96ac0ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.1 Linux/5.5.8-1-MANJARO
|
Security for awsfind 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.