Skip to content

runbooks inventory resource-explorerΒΆ

Auto-generated from runbooks inventory resource-explorer --help on 2026-05-21. Source of truth: runbooks PyPI package v1.3.22

Usage: runbooks inventory resource-explorer [OPTIONS]

  Discover AWS resources across multi-account organization.

  πŸ“Š Coverage: 88 AWS resource types supported by Runbooks CLI (Subset of 300+
  total AWS resource types - validated for automation)

  🎯 Purpose: Runbooks-specific discovery via AWS Resource Explorer - Multi-
  account aggregation (no individual account credentials needed) - 88
  validated resource types (compute, storage, network, security, etc.) -
  CSV/JSON export for enrichment pipeline

  πŸ’‘ Examples:   List supported types:  runbooks inventory resource-explorer
  --list-types   Discover EC2:          runbooks inventory resource-explorer
  --resource-type ec2 --profile $AWS_PROFILE   Discover all VPCs:     runbooks
  inventory resource-explorer --resource-type vpc --profile $AWS_PROFILE

  πŸ”‘ Required IAM Permissions (CENTRALISED_OPS_PROFILE):   - resource-
  explorer-2:Search (minimum)   - resource-explorer-2:GetIndex   - resource-
  explorer-2:ListIndexes

  ⚠️  Prerequisites:   - AWS Resource Explorer aggregator configured in
  management account   - Cross-account sharing enabled via AWS RAM   - Profile
  must have aggregator access (not individual account access)

  See https://docs.aws.amazon.com/resource-explorer/ for AWS service details.

  🎯 TRACK 3A: 3-COLUMN RICH DISPLAY (88 RESOURCE TYPES)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ Alias          β”‚ AWS Type            β”‚ Description β”‚
  │────────────────┼─────────────────────┼─────────────│
  β”‚ ec2            β”‚ ec2:instance        β”‚ Virtual...  β”‚
  β”‚ s3             β”‚ s3:bucket           β”‚ Object...   β”‚
  β”‚ lambda         β”‚ lambda:function     β”‚ Serverless..β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  πŸ“Š 10 CATEGORIES (Analytics, Compute, Databases, Developer Tools,
  Management, Migration, ML & AI, Networking, Security, Storage)

  βœ… VERTICAL ALIGNMENT: Pre-calculated column widths ensure consistent
  alignment across all categories (inventory.py:2438-2473)

  πŸ’‘ 100% Jira Coverage: All 22 resources from data/test/Jira.csv supported

  Enterprise Features:
  - Multi-account discovery (--all-profiles for all accounts)
  - Multi-region aggregation (--all-regions for all regions)
  - Tag-based filtering (--tags key=value)
  - Account filtering (--accounts 123,456)
  - Multi-format export (--export for CSV/JSON/PDF/Markdown)
  - Resource Explorer pagination support (1000+ resources)

  Examples:
      # Single profile discovery
      runbooks inventory resource-explorer --resource-type ec2 \
          --profile ${CENTRALISED_OPS_PROFILE} \
          --output data/ec2-discovered.csv

      # Console format export     runbooks inventory resource-explorer
      --resource-type ec2 \         --profile ${CENTRALISED_OPS_PROFILE} \
      --console-format \         --output data/ec2-console.csv

      # Multi-account discovery     runbooks inventory resource-explorer
      --resource-type lambda \         --all-profiles --output data/lambda-
      all-accounts.csv

  Tested & Validated:
  - 136 EC2 instances via CENTRALISED_OPS_PROFILE
  - 117 WorkSpaces via Resource Explorer aggregator
  - 1000+ snapshots with pagination support

  πŸ“– Use 'runbooks inventory resource-types' to see all 88 resource types

Options:
  --tags TEXT                     Filter by tags (key=value format)
  --accounts TEXT                 Filter by specific account IDs
  --all                           Multi-account discovery
                                  (CENTRALISED_OPS_PROFILE as aggregator).

                                  πŸ“‹ Behavior: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                  ━━━━━━━━━━━━━━━

                                  β€’ Queries AWS Resource Explorer aggregator
                                  index β€’ Discovers resources across ALL
                                  accounts in Landing Zone β€’ Requires
                                  CENTRALISED_OPS_PROFILE with cross-account
                                  permissions

                                  πŸ” Enrichment Layers (Automatic):   β€’
                                  Organizations metadata: MANAGEMENT_PROFILE
                                  β€’ Cost data: BILLING_PROFILE   Note:
                                  Enrichment uses separate profiles regardless
                                  of discovery mode

                                  Use Case: Enterprise platform teams managing
                                  67+ account Landing Zones
  --profiles TEXT                 Specific AWS profiles (comma-separated,
                                  e.g., "billing,security,audit")
  --regions TEXT                  Specific AWS regions (space-separated)
  --all-regions                   Process all enabled AWS regions
  -f, --format, --output-format [json|csv|table|pdf|markdown]
                                  Output format for results display
                                  (-f/--format preferred, --output-format
                                  legacy)
  --output-dir PATH               Directory for generated files and evidence
                                  packages
  --all-outputs                   Generate all output formats (JSON, CSV, PDF,
                                  Markdown) - use with --output-dir
  --csv                           Export to CSV format (convenience flag,
                                  activates --all-outputs)
  --json                          Export to JSON format (convenience flag,
                                  activates --all-outputs)
  --markdown                      Export to Markdown format (convenience flag,
                                  activates --all-outputs)
  --profile TEXT                  AWS profile for single-account operations.

                                  πŸ“‹ Profile Selection Guide: ━━━━━━━━━━━━━━━━━
                                  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

                                  Single Account β†’ Use --profile YOUR_PROFILE
                                  Example: --profile dev-account   When:
                                  Developer/operator working in one AWS
                                  account

                                  Multi-Account LZ β†’ Use --all-profiles (see
                                  inventory commands)   Example: --all-
                                  profiles   When: Platform team discovering
                                  across organization

                                  πŸ” Enrichment Profiles (Automatic):   β€’
                                  Organizations: MANAGEMENT_PROFILE   β€’ Costs:
                                  BILLING_PROFILE   Note: Separate from
                                  discovery profile

                                  Decision: Single account = --profile |
                                  Multi-account = --all-profiles
  --region TEXT                   AWS region override (default: ap-
                                  southeast-2)
  --dry-run                       Safe analysis mode - no resource
                                  modifications (enterprise default)
  --resource-type TEXT            Resource type to discover. Examples: 'ec2',
                                  'lambda', 'rds', 's3'. Use --list-types for
                                  full list.
  --list-types                    Display all 88 supported AWS resource types
                                  organized by category
  --query-filter TEXT             Resource Explorer query string for advanced
                                  filtering (e.g., 'tag:Environment=prod')
  --max-results INTEGER           Maximum number of results to return
                                  (default: unlimited with pagination)
  --aggregator-region TEXT        Override Resource Explorer aggregator region
                                  (default: auto-detect)
  --skip-pagination               Disable pagination for fast preview (returns
                                  first page only)
  --enrich-costs                  Enrich results with Cost Explorer data
  --console-format                Display Rich table to console AND export CSV
                                  (7 columns: Identifier, Service, Resource
                                  type, Region, AWS Account, Application, Tags
                                  matching AWS Console export format)
  --output PATH                   Output JSON file path
  -v, --verbose                   Show detailed execution logs
  --format-output [compact|table|json]
                                  Output format
  --help                          Show this message and exit.

ExamplesΒΆ