{"id":20055848,"url":"https://github.com/lewis262626/aws-sts","last_synced_at":"2026-05-12T17:45:47.772Z","repository":{"id":62553879,"uuid":"259424297","full_name":"lewis262626/aws-sts","owner":"lewis262626","description":"AWS STS Role CLI tool","archived":false,"fork":false,"pushed_at":"2020-04-29T22:10:36.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-15T07:49:33.279Z","etag":null,"topics":["aws","cli","ruby","sts"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/lewis262626.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-27T18:56:19.000Z","updated_at":"2020-04-30T12:25:53.000Z","dependencies_parsed_at":"2022-11-03T04:45:38.783Z","dependency_job_id":null,"html_url":"https://github.com/lewis262626/aws-sts","commit_stats":null,"previous_names":["lewisrobbins/aws-sts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewis262626%2Faws-sts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewis262626%2Faws-sts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewis262626%2Faws-sts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewis262626%2Faws-sts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lewis262626","download_url":"https://codeload.github.com/lewis262626/aws-sts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241484028,"owners_count":19970201,"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","cli","ruby","sts"],"created_at":"2024-11-13T12:49:46.024Z","updated_at":"2026-05-12T17:45:47.719Z","avatar_url":"https://github.com/lewis262626.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Ruby](https://github.com/lewisrobbins/aws-sts/workflows/Ruby/badge.svg?branch=master)\n[![Gem Version](https://badge.fury.io/rb/aws-sts.svg)](https://badge.fury.io/rb/aws-sts)\n\naws-sts\n==========\n\n[![asciicast](https://asciinema.org/a/324944.svg)](https://asciinema.org/a/324944)\n\n**The problem:** You want to be able to have short term credentials to your AWS account for security\n\n**The solution:** AWS STS and `aws-sts.rb`\n\nFeatures\n---------\n\nThis supports `~/.aws/config` making this tool easier to set-up.\n\nHow it Works\n-------------\n\nRoles are assumed, or session tokens are simply acquired (if `--no-role` is\nspecified) via the [`AssumeRole`][assume-role] or the\n[`GetSessionToken`][get-session-token] AWS STS API calls.  After this, your\ncommand or shell is launched with the standard AWS credential chain environment\nvariables set:\n\n * `AWS_ACCESS_KEY_ID`\n * `AWS_SECRET_ACCESS_KEY`\n * `AWS_SESSION_TOKEN`\n\n\nUsage\n------\n\nInstall the tool:\n\n1. `gem install aws-sts`\n2. `aws-sts \u003crole\u003e`\n\n\n\nConfiguration\n---\n\nSetup a profile for each role you'd like to use in your `~/.aws/config`.\n\n```ini\n[profile account]\nregion = eu-west-2\n\n[profile dev]\nregion = eu-north-1\nrole_arn = arn:aws:iam::1999:role/admin\nsource_profile = account\n```\n\nAnd then in your `~/.aws/credentials`\n\n```ini\n[account]\naws_access_key_id=XXXXXX\naws_secret_access_key=XXX\n```\n\nUsage\n---\n```bash\n$ ./aws-sts \u003crole\u003e\nexport AWS_ACCESS_KEY_ID=SXXXX\nexport AWS_SECRET_ACCESS_KEY=XXXX\nexport AWS_SESSION_TOKEN=XXXX\nexport ASSUMED_ROLE=dev\n# run eval $(ruby aws-sts.rb \u003cprofile\u003e)\n```\n\nBy default the credentials last for 3600 seconds or 1 hour.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewis262626%2Faws-sts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewis262626%2Faws-sts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewis262626%2Faws-sts/lists"}