Skip to main content

Find CloudFormation stacks across AWS accounts using SSO

Project description

Haystack

PyPI version Python versions Downloads License: MIT Tests

Managing a multi-account AWS organization? Haystack searches CloudFormation stacks across all your AWS accounts from the command line.

pip install aws-haystack
haystack platform-network

Why?

Before: ClickOps through AWS console → switch account → switch region → CloudFormation → list stacks → repeat 50 times
After: haystack platform-network → see all matches across all accounts

Usage

# Find any stack containing "api"
haystack api

# Search specific region only  
haystack database --region us-east-1

# First run: authenticate once via browser, then fast searches for ~8 hours

Search is smart: case-insensitive, partial matching

  • haystack api finds "user-api-prod", "api-gateway", "API-Service"
  • haystack prod finds "api-prod", "production-db", "PROD-Web"

What You Get

Clean results:

┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ Stack Name         ┃ Account ID  ┃ Account Name       ┃ Region    ┃ Status           ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ user-api-prod      │ 123456789   │ Production         │ us-east-1 │ CREATE_COMPLETE  │
│ user-api-staging   │ 987654321   │ Staging            │ us-east-1 │ CREATE_COMPLETE  │
└────────────────────┴─────────────┴────────────────────┴───────────┴──────────────────┘

Fast & secure:

  • Searches all accounts/regions in parallel
  • Uses AWS SSO (no hardcoded credentials)
  • Caches authentication for hours
  • Smart role selection (admin > power > first available)

Commands

haystack <search-term>                     # Search all accounts/regions
haystack <search-term> --region us-east-1 # Search specific region  
haystack --clear                           # Clear cached credentials
haystack --help                            # Show all options

Requirements

  • Python 3.8+
  • AWS Identity Center (SSO) access
  • Web browser (for one-time auth)

First run: Authenticate via browser, then fast searches for ~8 hours.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_haystack-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_haystack-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file aws_haystack-0.1.0.tar.gz.

File metadata

  • Download URL: aws_haystack-0.1.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aws_haystack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7849e1113ab4ee23fdf4277960b4033589d724a1b11a0a74d811829665b71ba1
MD5 3faad74fd294ef32071d88cd8c30b309
BLAKE2b-256 75ed83ff6ad753a490868486408f566e750062d5c5f64da237ed23de64d3c5a3

See more details on using hashes here.

File details

Details for the file aws_haystack-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aws_haystack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aws_haystack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec2d4c309bc41a7ab1457333d42d84683f65d1a5e9eb4e0428ee74901ca7e4b7
MD5 bf9ceec0d73cf872e74a3d4cb4249527
BLAKE2b-256 29c4eace58367a217e362b83d0cf876757743a2d1581067ab8ff4ff0377a67d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page