Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I stopped copying EC2 instance IDs (and why my CLI refuses to guess)

Description and use

hop simplifies connecting to EC2 instances across many accounts by aggregating profiles, parallel searching, caching, safe selection, and session‑recording checks.

Problem

Managing sessions to many EC2 instances across dozens of AWS accounts and regions required repetitive, error‑prone steps to locate and connect to a target machine.

Outcome

hop reduces the manual steps to connect to an EC2 instance from several commands and lookups to a single, safe command, while enforcing strict matching and session recording checks.

Workflow

  • Read all profiles from ~/.aws/config and ~/.aws/credentials
  • Query each account/region in parallel (16 at a time) and cache results for 15 minutes
  • Accept a search term (name, ID, IP) and list matching instances with profile and region
  • If exactly one strong match, open Session Manager automatically; otherwise present a picker or prompt for clarification
  • Validate instance state and freshness before connecting, re‑querying if data is older than one minute
  • Check SSM Session Manager logging configuration and warn if session will be recorded
  • Handle SSO tokens, grouping profiles by portal and refreshing expired tokens
  • Provide additional commands: run, tunnel, push, init ssh, etc.
  • Support experimental GCP IAP shells and future Azure integration

Evidence

Reaching one machine used to take several steps: remember which account it lives in, find the matching profile in ~/.aws/config, check the region, look up the instance ID in the console or with aws ec2 describe-instances, and finally type: aws ssm start-session ...

Source

hop reads every profile in ~/.aws/config and ~/.aws/credentials and queries each one in its own region. The queries run in parallel, 16 at a time, and the result stays in a local cache for 15 minutes.

Source

hop connects without asking only when exactly one instance matches strongly: its exact name, ID or IP, or whole words of a single name. Everything looser goes through you.

Source

hop: session LOGGED on shop-app (i-0ee8781d10780ec32, acme-prod, eu-west-3) to /ssm-logs. Everything that follows is recorded.

Source

gh attestation verify hop_0.3.1_linux_amd64.tar.gz -R morganseznec/hop slsa-verifier verify-artifact --provenance-path hop.intoto.jsonl ...

Source

  • Record date: 2026-11-02T01:28:44.834Z