{"id":15396632,"url":"https://github.com/hupe1980/gotoaws","last_synced_at":"2025-06-25T10:37:20.803Z","repository":{"id":39653899,"uuid":"368479395","full_name":"hupe1980/gotoaws","owner":"hupe1980","description":"Access your EC2 instance or ECS container seamlessly, eliminating the necessity for opening inbound ports, maintaining bastion hosts, or managing SSH keys.","archived":false,"fork":false,"pushed_at":"2025-04-10T08:36:01.000Z","size":768,"stargazers_count":20,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-16T01:53:29.220Z","etag":null,"topics":["aws","aws-ssm-agent","container","ec2","ecs","eks","fargate","go","golang","k8s","scp","session-manager","ssh","ssm"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/hupe1980/gotoaws","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hupe1980.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-18T09:51:55.000Z","updated_at":"2025-04-10T08:31:06.000Z","dependencies_parsed_at":"2025-04-16T02:03:34.116Z","dependency_job_id":null,"html_url":"https://github.com/hupe1980/gotoaws","commit_stats":null,"previous_names":["hupe1980/awsconnect","hupe1980/ec2connect"],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/hupe1980/gotoaws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgotoaws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgotoaws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgotoaws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgotoaws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hupe1980","download_url":"https://codeload.github.com/hupe1980/gotoaws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgotoaws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261853250,"owners_count":23219828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-ssm-agent","container","ec2","ecs","eks","fargate","go","golang","k8s","scp","session-manager","ssh","ssm"],"created_at":"2024-10-01T15:34:26.187Z","updated_at":"2025-06-25T10:37:20.771Z","avatar_url":"https://github.com/hupe1980.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"gotoaws Logo\" src=\"./icon.png\" height=\"140\" /\u003e\n  \u003ch3 align=\"center\"\u003egotoaws\u003c/h3\u003e\n\u003c/p\u003e\n\n`gotoaws` is an interactive CLI tool that you can use to connect to your AWS resources (EC2, ECS container) using the [AWS Systems Manager Session Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html). It provides secure and auditable resource management without the need to open inbound ports, maintain bastion hosts, or manage SSH keys.\n\n![summry](summary.png)\n\n## Prerequisites\n- [session-manager-plugin](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) must be installed on your client\n- SSM Agent version 2.3.672.0 or later must be installed on the instances you want to connect to through sessions\n- An instance profile with proper IAM permissions (e.g AmazonSSMManagedInstanceCore)\n- A connection to the AWS System Manager Servive via NAT or better via [VPC Endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints.html) to further reduce the attack surface\n- [Prerequisites for using ECS Exec](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html)\n## Installing\nYou can install the pre-compiled binary in several different ways\n\n### homebrew tap:\n```bash\nbrew tap hupe1980/gotoaws\nbrew install gotoaws\n```\n\n### scoop:\n```bash\nscoop bucket add gotoaws https://github.com/hupe1980/gotoaws-bucket.git\nscoop install gotoaws\n```\n\n### deb/rpm/apk:\n\nDownload the .deb, .rpm or .apk from the [releases page](https://github.com/hupe1980/gotoaws/releases) and install them with the appropriate tools.\n\n### manually:\nDownload the pre-compiled binaries from the [releases page](https://github.com/hupe1980/gotoaws/releases) and copy to the desired location.\n\n## How to use\n```\nUsage:\n  gotoaws [command]\n\nAvailable Commands:\n  completion  Prints shell autocompletion scripts for gotoaws\n  config      Manage your local gotoaws CLI config file\n  ec2         Connect to ec2\n  ecs         Connect to ecs\n  eks         Connect to eks\n  help        Help about any command\n\nFlags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n  -h, --help               help for gotoaws\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n  -v, --version            version for gotoaws\n\nUse \"gotoaws [command] --help\" for more information about a command.\n```\n\n## EC2\nYou can connect to your instances by name, ID, DNS, IP or select an instance from a list.\n```\nUsage:\n  gotoaws ec2 [command]\n\nAvailable Commands:\n  fwd         Port forwarding\n  run         Run commands\n  scp         SCP over Session Manager\n  session     Start a session\n  ssh         SSH over Session Manager\n\nFlags:\n  -h, --help   help for ec2\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n\nUse \"gotoaws ec2 [command] --help\" for more information about a command.\n```\n#### Start a session\n```\nUsage:\n  gotoaws ec2 session [flags]\n\nExamples:\ngotoaws ec2 session -t myserver\n\nFlags:\n  -h, --help            help for session\n  -t, --target string   name|ID|IP|DNS of the instance\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n#### Port forwarding\n```\nUsage:\n  gotoaws ec2 fwd [flags]\n\nExamples:\ngotoaws ec2 fwd run -t myserver -l 8080 -r 8080\ngotoaws ec2 fwd run -t myserver -l 5432 -r 5432 -H xxx.rds.amazonaws.com\n\nFlags:\n  -h, --help            help for fwd\n  -H, --host string     remote host to forward to\n  -l, --local string    local port to use (required)\n  -r, --remote string   remote port to forward to (required)\n  -t, --target string   name|ID|IP|DNS of the instance\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n#### Run commands\n```\nUsage:\n  gotoaws ec2 run [flags] -- COMMAND [args...]\n\nExamples:\ngotoaws ec2 run -- date\ngotoaws ec2 run -t myserver -- date\n\nFlags:\n  -h, --help            help for run\n  -t, --target string   name|ID|IP|DNS of the instance\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n#### SSH over Session Manager\n```\nUsage:\n  gotoaws ec2 ssh [command] [flags]\n\nExamples:\ngotoaws ssh -t myserver -i key.pem\n\nFlags:\n  -h, --help              help for ssh\n  -i, --identity string   file from which the identity (private key) for public key authentication is read (required)\n  -L, --lforward string   local port forwarding\n  -p, --port string       SSH port to us (default \"22\")\n  -t, --target string     name|ID|IP|DNS of the instance\n  -l, --user string       SSH user to us (default \"ec2-user\")\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n#### SCP over Session Manager\n```\nUsage:\n  gotoaws ec2 scp [source(s)] [target] [flags]\n\nExamples:\ngotoaws ec2 scp file.txt /opt/ -t myserver -i key.pem\n\nFlags:\n  -h, --help              help for scp\n  -i, --identity string   file from which the identity (private key) for public key authentication is read (required)\n  -p, --port string       SSH port to us (default \"22\")\n  -R, --recv              receive files from target\n  -t, --target string     name|ID|IP|DNS of the instance\n  -l, --user string       SCP user to us (default \"ec2-user\")\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n## ECS\nYou can directly interact with containers without needing to first interact with the host container operating system, open inbound ports, or manage SSH keys.\n \n```\nUsage:\n  gotoaws ecs [command]\n\nAvailable Commands:\n  exec        Execute a command in a container\n\nFlags:\n  -h, --help   help for ecs\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n\nUse \"gotoaws ecs [command] --help\" for more information about a command.\n```\n\n### Execute a command in a container\n```\nUsage:\n  gotoaws ecs exec [flags] -- COMMAND [args...]\n\nExamples:\ngotoaws ecs exec --cluster demo-cluster\n\nFlags:\n      --cluster string     arn or name of the cluster (default \"default\")\n      --container string   name of the container. A container name only needs to be specified for tasks containing multiple containers\n  -h, --help               help for exec\n      --task string        arn or id of the task\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n## EKS\n```\nUsage:\n  gotoaws eks [command]\n\nAvailable Commands:\n  exec              Execute a command in a container\n  fwd               Port forwarding\n  get-token         Get a token for authentication with an Amazon EKS cluster\n  logs              Print the logs for a container in a pod\n  update-kubeconfig Configures kubectl so that you can connect to an Amazon EKS cluster\n\nFlags:\n  -h, --help   help for eks\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n\nUse \"gotoaws eks [command] --help\" for more information about a command.\n```\n\n### Execute a command in a container\n```\nUsage:\n  gotoaws eks exec [flags] -- COMMAND [args...]\n\nExamples:\ngotoaws eks exec --cluster gotoaws --role cluster-admin\ngotoaws eks exec --cluster gotoaws --role cluster-admin -- /bin/sh\ngotoaws eks exec --cluster gotoaws --role cluster-admin -- cat /etc/passwd\ngotoaws eks exec --cluster gotoaws --role cluster-admin --namespace default --pod nginx -- date\n\nFlags:\n      --cluster string     arn or name of the cluster\n  -c, --container string   name of the container\n  -h, --help               help for exec\n  -n, --namespace string   namespace of the pod (default \"all namespaces\"\n  -p, --pod string         name of the pod\n      --role string        arn or name of the role\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n### Port forwarding\n```\nUsage:\n  gotoaws eks fwd [flags]\n\nExamples:\ngotoaws eks fwd --cluster gotoaws --role cluster-admin --pod nginx\ngotoaws eks fwd --cluster gotoaws --role cluster-admin --pod nginx --local 8000 --remote 80\n\nFlags:\n      --cluster string     arn or name of the cluster\n  -h, --help               help for fwd\n  -l, --local int32        the local port\n  -n, --namespace string   namespace of the pod (default \"all namespaces\"\n  -p, --pod string         name of the pod\n  -r, --remote int32       the container port\n      --role string        arn or name of the role\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n### Get a token for authentication with an Amazon EKS cluster\n```\nUsage:\n  gotoaws eks get-token [flags]\n\nFlags:\n      --cluster string   arn or name of the cluster\n  -h, --help             help for get-token\n      --role string      arn or name of the role\n      --token-only       Return only the token for use with Bearer token based tools\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n### Print the logs for a container in a pod\n```\nUsage:\n  gotoaws eks logs [flags]\n\nExamples:\ngotoaws eks logs --cluster gotoaws --role cluster-admin --pod nginx\ngotoaws eks logs --cluster gotoaws --role cluster-admin --pod nginx --container nginx\n\nFlags:\n      --cluster string     arn or name of the cluster\n  -c, --container string   name of the container\n  -h, --help               help for logs\n  -n, --namespace string   namespace of the pod (default for finder \"all namespaces\"\n  -p, --pod string         name of the pod\n      --role string        arn or name of the role\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n### Configures kubectl so that you can connect to an Amazon EKS cluster\n```\nUsage:\n  gotoaws eks update-kubeconfig [flags]\n\nFlags:\n      --alias string     alias for the cluster context name (default \"arn of the cluster\"\n      --cluster string   arn or name of the cluster\n  -h, --help             help for update-kubeconfig\n      --role string      arn or name of the role\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n```\n\n## Manage your local gotoaws CLI config file\n```\nUsage:\n  gotoaws config [command]\n\nAvailable Commands:\n  get         Print a config value\n  set         Create a new config value\n  unset       Remove a config value\n\nFlags:\n  -h, --help   help for config\n\nGlobal Flags:\n      --config string      config file (default \"$HOME/.config/configstore/gotoaws.json\")\n      --profile string     AWS profile\n      --region string      AWS region\n      --silent             run gotoaws without printing logs\n      --timeout duration   timeout for network requests (default 15s)\n\nUse \"gotoaws config [command] --help\" for more information about a command.\n```\n\nSupported `KEY` values:\n\nKey | Description \n--- | ------------\nprofile | AWS profile\nregion | AWS region\ntimeout | timeout for network requests\nsilent | run gotoaws without printing logs\n\n\n## License\n[MIT](LICENCE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Fgotoaws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhupe1980%2Fgotoaws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Fgotoaws/lists"}