get_aws_details
Overview
Get multi-region details from AWS Organizations accounts.
This module helps to retrieve AWS details from multiple Organizations accounts and regions. It features the following capabilities:
SSO authentication
Pagination (see caveat)
Multithreading (requires a cross-account role to assume)
CSV output
Account filtering by status, Organizational Unit, or list (in this order of precedence)
Caveat
Works with paginated AWS service commands only.
Usage
Installation:
pip3 install get_aws_details
# or
python3 -m pip install get_aws_details
Command example:
# Overview.
aws_details -h
# Get all VPC primary CIDR blocks.
aws_details \
-a 123456789012 \
-u https://my-sso-portal.awsapps.com/start/#/ \
-r MySSORoleName \
-n MyAssumedRoleName \
-s ACTIVE \
-g ALL \
-v ec2 \
-p Vpcs \
-c describe_vpcs \
-k vpc_id=VpcId is_default=IsDefault cidr_block=CidrBlock
Output example:
vpc_id,is_default,cidr_block,account_id,region
vpc-0a1b2c3d4e5f6g7h,True,10.0.0.0/16,123456789012,us-east-1
vpc-321asd4f5g6h7j8k,False,192.168.1.0/24,987654321098,ap-southeast-3
Arguments
Required:
-a, --sso_account_id SSO_ACCOUNT_ID
SSO Account ID.
-u, --sso_url SSO_URL
SSO URL.
-r, --sso_role_name SSO_ROLE_NAME
SSO Role Name.
-v, --service SERVICE
AWS service to query (example: ec2).
-p, --page_key PAGE_KEY
Pagination key for the AWS service response (example: Vpcs).
-c, --command COMMAND
AWS service command to execute (example: describe_vpcs).
Conditional:
-n, --assumed_role_name [ASSUMED_ROLE_NAME]
Assumed Role Name (default: None).
-e, --external_id [EXTERNAL_ID]
External ID for assumed role (default: None).
-s, --account_statuses [ACCOUNT_STATUSES]
Comma-separated account statuses to filter (default: None).
-o, --account_ou [ACCOUNT_OU]
Account Organizational Unit to filter (default: None).
-l, --account_list [ACCOUNT_LIST]
Comma-separated list of account IDs to filter (default: None).
-k, --kvps KVPS [KVPS ...]
Key-value pairs for CSV output (format: key=value).
-i, --filters [FILTERS ...]
Filters for AWS service query (format: Name=Values).
Optional:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-t, --thread_num [THREAD_NUM]
Number of threads to use for multithreading (default: 10).
-f, --output_file [OUTPUT_FILE]
Path to the output CSV file (default: aws_details.csv).
-g, --region REGION Region to query (example: us-east-1 or ALL for all regions, default: ALL).
Release files for get_aws_details 1.2.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 | |
|---|---|---|---|
| get_aws_details-1.2.0.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| get_aws_details-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / get_aws_details-1.2.0.tar.gz
| Download URL | get_aws_details-1.2.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7270cc721eec43fd0c3522849391b6831e084a0dbeccd8d7895b1b142eea95e9
|
|
BLAKE2b-256 checksum How to use checksums |
a1f17923443a74320caf5cc3d4d250e68b7c3099d96d5f70fc9d141b11e3f6ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.4 Linux/5.15.154+
|
Release files / get_aws_details-1.2.0-py3-none-any.whl
| Download URL | get_aws_details-1.2.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cfcb2a5dc3a47221badacd62443915f07c2f8203adce9c7cea8278a0934bdca
|
|
BLAKE2b-256 checksum How to use checksums |
4cf4168a33d2a8a6fa3c99aba82e76d8aa0ef8376f13d4ca66db50195ae80dd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.4 Linux/5.15.154+
|