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

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

说明与用途

hop 通过聚合配置文件、并行搜索、缓存、自动选择和会话记录检查,简化了在多个账户中连接 EC2 实例的过程。

问题

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.

结果

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.

工作流

  • 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

证据

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 ...

来源

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.

来源

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.

来源

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

来源

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

来源

  • 记录日期: 2026-11-02T01:28:44.834Z