{"id":28277343,"url":"https://github.com/sam701/awstools","last_synced_at":"2025-10-14T06:06:19.408Z","repository":{"id":93646353,"uuid":"57389005","full_name":"sam701/awstools","owner":"sam701","description":"A few helpful AWS tools written in Go","archived":false,"fork":false,"pushed_at":"2020-01-26T18:07:13.000Z","size":94,"stargazers_count":68,"open_issues_count":6,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-01T04:38:39.836Z","etag":null,"topics":["aws","awstools","cli","golang","linux","osx"],"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/sam701.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-04-29T14:03:20.000Z","updated_at":"2024-12-20T19:11:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dafa557-18a0-4ecd-a30c-3906e78a8bf9","html_url":"https://github.com/sam701/awstools","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/sam701/awstools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam701%2Fawstools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam701%2Fawstools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam701%2Fawstools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam701%2Fawstools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sam701","download_url":"https://codeload.github.com/sam701/awstools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam701%2Fawstools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018121,"owners_count":26086280,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","awstools","cli","golang","linux","osx"],"created_at":"2025-05-21T06:15:48.916Z","updated_at":"2025-10-14T06:06:19.391Z","avatar_url":"https://github.com/sam701.png","language":"Go","readme":"# awstools\n[![Build Status](https://travis-ci.org/sam701/awstools.svg?branch=master)](https://travis-ci.org/sam701/awstools) A few helpful AWS tools.\n\n```\nNAME:\n   awstools - AWS tools\n\nUSAGE:\n   awstools [global options] command [command options] [arguments...]\n\nVERSION:\n   0.13.2\n\nCOMMANDS:\n     assume                      assume role on a specified account\n     accounts                    print known accounts\n     ec2                         print EC2 instances and ELBs\n     cloudformation, cf          print CloudFormation stacks information\n     rotate-main-account-key, r  create a new access key for main account and delete the current one\n     dynamodb, ddb               dynamodb commands\n     kms                         encrypt/decrypt text\n     kinesis                     print records from kinesis streams\n     cloudwatch, cw              search in cloudwatch logs\n     help, h                     Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --config value, -c value  path to config.toml file (default: ~/.config/awstools/config.toml)\n   --no-color                turn off color output\n   --help, -h                show help\n   --version, -v             print the version\n```\n\n## Note\nConsider also [awscredx](https://github.com/sam701/awscredx) if you are mostly interested in role assumption.\n\n## Install\n\n[We provide binaries for all releases through GitHub](https://github.com/sam701/awstools/releases). The latest release is [0.13.2](https://github.com/sam701/awstools/releases/latest).\n\nTo install `awstools` choose the binary for your architecture (either OSX or Linux), run a download and use `chmod` to make it executable.\n\n### OSX\n\nOn Mac you can use Homebrew to install the binary:\n\n```sh\n$ brew tap sam701/awstools\n$ brew install awstools\n```\n\n### Linux\n\n```sh\n$ curl -o awstools -SsL https://github.com/sam701/awstools/releases/download/0.13.2/awstools_linux_amd64\n$ chmod +x awstools\n```\n\n## Build\nExport reqired environment variables:\n```sh\nexport GOPATH=$HOME/goprojects\nexport PATH=$PATH:$GOPATH/bin\n```\n\nInstall `awstools`:\n```sh\ngo get -u github.com/sam701/awstools\n```\n\n## Configuration\nThe default path to the configuration file is `$HOME/.config/awstools/config.toml`.\n\nHere is an example of a `config.toml`:\n```toml\ndefaultRegion = \"eu-west-1\"\ndefaultKmsKey = \"arn:aws:kms:eu-west-1:000000000001:key/00000000-1111-1111-2222-333333333333\"\n\n# Rotate the main account access key every week\nkeyRotationIntervalMinutes = 10080\n\n# Reuse current credentials, if they are valid for at least 10 minutes.\nreuseCredentialsIfValidForMinutes = 10\n\n[profiles]\nmainAccount = \"main_account\"\nmainAccountMfaSession = \"main_account_mfa_session\"\n\n[accounts]\nmain = \"000000000001\"\ndev = \"000000000002\"\nprod = \"000000000003\"\n```\n\n* `profiles` section contains profile names that will be saved in `$HOME/.aws/credentials`.\n* `accounts` section contains account ids and its names.\n\nAdd to your `.bash_profile`\n```sh\naws_assume(){\n\ttmpFile=/tmp/assume.tmp\n\tawstools assume --export $tmpFile --export-profile $@ \u0026\u0026 source $tmpFile\n\trm $tmpFile\n}\n```\nor to your `~/.config/fish/config.fish`\n```sh\nfunction aws_assume\n\tset tmp /tmp/aws_assume.tmp\n\tawstools assume --export $tmp --export-profile $argv; and source $tmp\n\trm $tmp\nend\n```\n`--export-profile` flag tells `awstools` to print only `AWS_PROFILE` instead of printing `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_SESSION_TOKEN` variables.\nThis will become the default behavior later.\n\nNow in order to assume a role on a subaccount, you can run something like this\n```sh\naws_assume AccountName MyRoleOnSubAccount\n```\n\n### Required IAM permissions\n\n#### AssumeRole\n\nFor assuming a role in another account `awstools` needs the following permissions:\n\n- `iam:GetUser`\n- `iam:ListAccessKeys`\n\n*Note: `awstools` is using the MFA authenticated sessions for operations on your AWS access key.*\n\n#### Access Key Rotation\n\nFor rotating access keys on the relevant account `awstools` needs the following permissions:\n\n- `iam:GetUser`\n- `iam:CreateAccessKey`\n- `iam:DeleteAccessKey`\n- `iam:ListAccessKeys`\n- `iam:UpdateAccessKey`\n\n*Note: `awstools` is using the MFA authenticated sessions for operations on your AWS access key.*\n\n# License\n\nThis project is licensed under the MIT license. You can find a copy of the license at the top level of the repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsam701%2Fawstools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsam701%2Fawstools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsam701%2Fawstools/lists"}