{"id":43756526,"url":"https://github.com/goldeneggg/lsec2","last_synced_at":"2026-02-05T14:31:29.180Z","repository":{"id":57481912,"uuid":"68935170","full_name":"goldeneggg/lsec2","owner":"goldeneggg","description":"List view of AWS EC2 instances","archived":false,"fork":false,"pushed_at":"2023-02-14T15:54:25.000Z","size":1201,"stargazers_count":22,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-13T18:19:04.740Z","etag":null,"topics":["aws-ec2","go"],"latest_commit_sha":null,"homepage":"","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/goldeneggg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2016-09-22T15:30:22.000Z","updated_at":"2024-04-16T00:15:12.000Z","dependencies_parsed_at":"2024-06-20T11:27:16.467Z","dependency_job_id":null,"html_url":"https://github.com/goldeneggg/lsec2","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/goldeneggg/lsec2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldeneggg%2Flsec2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldeneggg%2Flsec2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldeneggg%2Flsec2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldeneggg%2Flsec2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldeneggg","download_url":"https://codeload.github.com/goldeneggg/lsec2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldeneggg%2Flsec2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29123675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T14:05:12.718Z","status":"ssl_error","status_checked_at":"2026-02-05T14:03:53.078Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-ec2","go"],"created_at":"2026-02-05T14:31:28.227Z","updated_at":"2026-02-05T14:31:29.169Z","avatar_url":"https://github.com/goldeneggg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lsec2\n\n[![Workflow Status](https://github.com/goldeneggg/lsec2/workflows/CI/badge.svg)](https://github.com/goldeneggg/lsec2/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/goldeneggg/lsec2)](https://goreportcard.com/report/github.com/goldeneggg/lsec2)\n[![GolangCI](https://golangci.com/badges/github.com/goldeneggg/gat.svg)](https://golangci.com/r/github.com/goldeneggg/lsec2)\n[![Codecov](https://codecov.io/github/goldeneggg/lsec2/coverage.svg?branch=master)](https://codecov.io/github/goldeneggg/lsec2?branch=master)\n[![MIT License](http://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/goldeneggg/lsec2/blob/master/LICENSE)\n\nList view of AWS EC2 instances.\n\nExample as follows.\n\n```sh\n$ lsec2 -H\n```\n```\nINSTANCE_ID            PRIVATE_IP         PUBLIC_IP         TYPE        STATE      TAGS\ni-0xxxxxxxxxxxxxx1     172.111.111.111    54.111.111.111    t2.micro    running    TagA=ValueA,TagB=ValueB\ni-0xxxxxxxxxxxxxx2     172.222.222.222    54.222.222.222    t2.medium   running    TagAA=ValueAA\ni-0xxxxxxxxxxxxxx3     172.333.333.333    54.333.333.333    t1.large    stopped\n```\n\n## Install\n\n### Using Homebrew for OS X\n\n```sh\n$ brew install goldeneggg/tap/lsec2\n```\n\n___Note:___\n\nIf you have already installed an old version's lsec2 using `brew tap goldenegg/lsec2` command and `brew install lsec2` command, please uninstall old version.\n\n```sh\n# uninstall old tap version\n$ brew uninstall lsec2\n$ brew untap goldeneggg/lsec2\n\n# and install new tap version\n$ brew install goldeneggg/tap/lsec2\n```\n\n### Or `go get`\n\n```sh\n$ go get -u github.com/goldeneggg/lsec2\n```\n\n### Or direct download\n\nDownload from [latest release](https://github.com/goldeneggg/lsec2/releases/latest)\n\n## Configuration\n\n### Create `~/.aws/credentials` file\n__If you have already installed [aws\\-cli](https://github.com/aws/aws-cli), I recommend setting up by `aws configure` command.__\n\nWrite your credential information in `~/.aws/credentials` file.\n\n* Write a section\n  * Default is `[default]`. It's known as \"Profile\".\n* Write `aws_access_key_id` in your section\n* Write `aws_secret_access_key` in your section\n\n```ini\n[default]\naws_access_key_id = YOUR_ACCESS_KEY_ID\naws_secret_access_key = YOUR_SECRET_ACCESS_KEY\n```\n\nMore information: [session \\- Amazon Web Services \\- Go SDK](http://docs.aws.amazon.com/sdk-for-go/api/aws/session/)\n\n### Or Set environment variables\n\n2 variables are required\n\n```sh\n$ export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY_ID\n$ export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY\n```\n\n### Change runtime profile\nUse `--profile` option\n\n```ini\n[default]\naws_access_key_id = YOUR_ACCESS_KEY_ID\naws_secret_access_key = YOUR_SECRET_ACCESS_KEY\n\n[test]\naws_access_key_id = YOUR_ACCESS_KEY_ID2\naws_secret_access_key = YOUR_SECRET_ACCESS_KEY2\n```\n```sh\n$ lsec2  # use \"default\" profile\n$ lsec2 --profile test  # use \"test\" profile\n```\n\n### Use profile with AssumeRole\nSee https://github.com/goldeneggg/lsec2/pull/21\n\n\n## Usage\n\n```sh\n# print all instances info by list view\n$ lsec2\n```\n\nResult contains informations of instances as follows\n\n* instance id\n* private ip address\n* public ip address\n* instance type\n* instance state\n* tags\n\nShow more detail information by typing `lsec2 -h`\n\n### Assign region\n\nYou can use 3 patterns\n\n* assign by `--region` option (top priority)\n\n```sh\n$ lsec2 --region ap-northeast-1\n```\n\n* write `region` key in `~/.aws/config` file\n\n```sh\n$ vi ~/.aws/config\n```\n```ini\n[default]\nregion = ap-northeast-1\n```\n\n* set `AWS_REGION` environment\n\n```sh\n$ export AWS_REGION=ap-northeast-1\n```\n\nShow more information from public AWS documents\n\n* [SDK Configuration — Developer Guide](https://docs.aws.amazon.com/sdk-for-go/v1/developerguide/configuring-sdk.html)\n* [Sessions — Developer Guide](http://docs.aws.amazon.com/sdk-for-go/v1/developerguide/sessions.html)\n\n### Filter by tag\n\n```sh\n# filterd by a tag key-value separated by \"=\"\n$ lsec2 TagName1=tagvalue1\n\n# filterd by some tags\n$ lsec2 TagName1=tagvalue1 TagNameN=tagvalueN\n\n# filterd by a tag multiple values separated by comma\n$ lsec2 TagName1=tagvalue11,tagvalue12,tagvalue1N\n```\n\n### Options\n\n```sh\n# with header\n$ lsec2 -H\n\n# filter state\n$ lsec2 -s running\n$ lsec2 -s stopped\n$ lsec2 -s OTHER_STATE\n\n# print only private IP address\n$ lsec2 -p\n\n# print state with color\n# (\"running\" is green, \"stopped\" is red, and others are yellow)\n$ lsec2 -c\n\n# change column delimiter (default delimiter is TAB)\n$ lsec2 -d ,\n```\n\n## Tips\n\n### With peco\n[peco](https://github.com/peco/peco) is a very useful interactive filtering tool.\n\n* Example: print instances =\u003e select instance =\u003e SSH to selected instance\n\n```sh\n# add function to your .bashrc or .bash_profile or other shell dotfile\n$ vi YOUR_DOTFILE\n\nlssh () {\n  IP=$(lsec2 $@ | peco | awk -F \"\\t\" '{print $2}')\n  if [ $? -eq 0 -a \"${IP}\" != \"\" ]\n  then\n      ssh ${IP}\n  fi\n}\n\n\n# load dotfile\n$ source YOUR_DOTFILE\n\n# shortcut \"lsec2 OPTIONS TAG_FILTERS\" =\u003e \"ssh PRIVATE_IP\"\n$ lssh TagName1=tagvalue1\n```\n\n### With gat\n[gat](https://github.com/goldeneggg/gat) is a file posting tool to various services like `cat` command.\n\n* Example: print instances =\u003e share your slack\n\n```sh\n# shortcut \"lsec2 OPTIONS TAG_FILTERS\" =\u003e copy this results to your slack channel\n$ lsec2 TagName1=tagvalue1 | gat slack\n```\n\n## Contribute\nPlease follow [Contributor's Guide](CONTRIBUTING.md)\n\n## Contact\n\nBugs: [issues](https://github.com/goldeneggg/lsec2/issues)\n\n\n## ChangeLog\n[CHANGELOG](CHANGELOG.md) file for details.\n\n\n## License\n\n[LICENSE](LICENSE) file for details.\n\n## Special Thanks\n[@sugitak](https://github.com/sugitak)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldeneggg%2Flsec2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldeneggg%2Flsec2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldeneggg%2Flsec2/lists"}