___ _____ _______ ___ ______ / | / ___//_ __/ / |/_ __/ / /| | \__ \ / / / /| | / / / ___ |___/ / / / / ___ |/ / /_/ |_/____/ /_/ /_/ |_/_/ |
β‘ A blazing fast CLI tool that caches AWS resources details locally and provides deep infrastructure tracing
Features β’ Installation β’ Quick Start β’ Usage β’ Documentation
Tired of waiting for AWS CLI commands to complete? astat caches AWS resources stats locally for instant access and provides deep infrastructure tracing to visualize exactly how your domain requests flow through AWS
100-250x faster for everyday queries!
# Traditional AWS CLI (slow, every time)
$ time aws <service> describe-* --query '...'
# ... 2-5 seconds
# astat (instant, after first cache)
$ time astat <service> list
# ... 0.02 seconds β‘
# understand exactly how your domain requests flow through AWS
$ astat domain trace myr53.hostedrecord.com/api
|
|
|
|
|
|
astat provides native support for these AWS services with lightning-fast local caching:
| Service | Status |
|---|---|
| EC2 | β Supported |
| S3 | β Supported |
| Lambda | β Supported |
| Route53 | β Supported |
| CloudFront | β Supported |
| Load Balancers | β Supported |
| RDS | β Supported |
| SQS | β Supported |
| SSM | β Supported |
curl -sSL https://raw.githubusercontent.com/sunil-saini/astat/refs/heads/main/install.sh | shbrew install sunil-saini/tap/astatDownload the latest binary for your platform:
# macOS (Apple Silicon)
curl -LO https://github.com/sunil-saini/astat/releases/latest/download/astat_darwin_arm64.tar.gz
tar -xzf astat_darwin_arm64.tar.gz
sudo mv astat /usr/local/bin/
# macOS (Intel)
curl -LO https://github.com/sunil-saini/astat/releases/latest/download/astat_darwin_x86_64.tar.gz
tar -xzf astat_darwin_x86_64.tar.gz
sudo mv astat /usr/local/bin/
# Linux (amd64)
curl -LO https://github.com/sunil-saini/astat/releases/latest/download/astat_linux_x86_64.tar.gz
tar -xzf astat_linux_x86_64.tar.gz
sudo mv astat /usr/local/bin/go install github.com/sunil-saini/astat@latest-
Install astat (see above)
-
Set up shell completion and PATH (needed in case of Direct Download):
astat install
-
Configure AWS credentials (if not already done):
aws configure # or use environment variables, IAM roles, etc. -
Check status and populate cache:
astat status # First run will trigger automatic cache refresh -
Start using (instantly!):
astat ec2 list astat s3 list astat lambda list astat domain trace myr53.hostedrecord.com/api
# EC2 instances
astat ec2 list # or: astat ec2 ls
astat ec2 list my-ec2 # Search/Filter by name, ID or IP
astat ec2 list --refresh # Force refresh from AWS
# S3 buckets
astat s3 list
# Lambda functions
astat lambda list
# CloudFront distributions
astat cloudfront list
# Route53 hosted zones
astat route53 list
# Route53 DNS records
astat route53 records
# SSM parameters
astat ssm list
astat ssm get <parameter-name>The flagship feature of astat! Trace exactly how a domain or request URI is routed through your AWS infrastructure
# Trace a specific URI
astat domain trace myr53.hostedrecord.com/api
SUCCESS Trace complete for myr53.hostedrecord.com/api
myr53.hostedrecord.com/api
βββ¬[Route53] myr53.hostedrecord.com. -> my-alb-1234567890.us-east-1.elb.amazonaws.com. (Alias+A)
βββ¬[ALB] my-alb (internet-facing) -> my-alb-1234567890.us-east-1.elb.amazonaws.com
βββ¬[Listener] HTTP:80
β βββ[Rule] Priority 3: [host-header:myr53.hostedrecord.com]
βββ¬[Listener] HTTPS:443
βββ¬[Rule] Priority 24999: [host-header:myr53.hostedrecord.com]
βββ¬[TargetGroup] my-target-group
βββ[Target] 10.10.0.1 -> healthy
βββ[Target] 10.10.0.2 -> healthy
βββ[Target] 10.10.0.3 -> healthyWhat it traces:
- External DNS: Current IPs and CNAME chains
- Route53: Zone matching, A/AAAA/CNAME/Alias records
- CloudFront: Distribution aliases, origins, and cache behaviors
- ELB (v1 & v2): ALB/NLB/CLB listeners, rules, and conditions
- Targets: Target Groups, health status, and EC2/Lambda targets
# Refresh all services concurrently
astat refresh
# Refresh specific service
astat ec2 list --refresh# View cache status and check for updates
astat status# View current configuration
astat config list
# Set cache TTL (default: 24h)
astat config set ttl 1h
# Enable/disable auto-refresh (default: enabled)
astat config set auto-refresh true# Check for and install updates
astat upgrade
# Check current version
astat versionastat stores configuration in ~/.config/astat/config.yaml and cache in ~/.cache/astat/.
Available Settings:
| Setting | Default | Description |
|---|---|---|
ttl |
1h |
Cache time-to-live (e.g., 30m, 2h, 1d) |
auto-refresh |
true |
Automatically refresh stale data |
cache_dir |
~/.cache/astat |
Custom cache directory (optional) |
route53-max-records |
1000 |
Fetch Records from a Zone if it have less than this records (optional) |
# Table format (default)
astat ec2 list
# JSON format
astat ec2 list --output json
# Pipe to jq for advanced filtering
astat ec2 list --output json | jq '.[] | select(.State.Name == "running")'Run astat install to automatically set up shell completion, or manually:
# Bash
astat completion bash > /etc/bash_completion.d/astat
# Zsh
astat completion zsh > "${fpath[1]}/_astat"
# Fish
astat completion fish > ~/.config/fish/completions/astat.fishgit clone https://github.com/sunil-saini/astat.git
cd astat
go build -o astat main.gogo test ./...- Multi Region support
Contributions are welcome! Please see CONTRIBUTING.md for details.
MIT License - see LICENSE file for details.
Built with these amazing tools:
- Cobra - Powerful CLI framework
- Viper - Configuration management
- pterm - Beautiful terminal output
- AWS SDK for Go v2 - Official AWS SDK
Made with β€οΈ by Sunil Saini
If you find this project useful, please consider giving it a β!