{"id":18458336,"url":"https://github.com/crazyfactory/aws-sts-helper","last_synced_at":"2025-04-23T12:24:28.572Z","repository":{"id":74458784,"uuid":"385516695","full_name":"crazyfactory/aws-sts-helper","owner":"crazyfactory","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-29T08:18:37.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-16T15:31:08.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazyfactory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-07-13T07:30:28.000Z","updated_at":"2022-03-23T07:39:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"32cb7309-e1e0-485e-8637-3a68c05b11d8","html_url":"https://github.com/crazyfactory/aws-sts-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyfactory%2Faws-sts-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyfactory%2Faws-sts-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyfactory%2Faws-sts-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyfactory%2Faws-sts-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazyfactory","download_url":"https://codeload.github.com/crazyfactory/aws-sts-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250431915,"owners_count":21429581,"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":[],"created_at":"2024-11-06T08:17:53.748Z","updated_at":"2025-04-23T12:24:28.566Z","avatar_url":"https://github.com/crazyfactory.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS STS Helper\n\nThis provides two bash scripts to help take the pain from `get-session-token` and `assume-role` calls.\n\n# Install\n\nYou need jq\n\n## Windows\n\nRun in elevated git bash:\n\n`curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe`\n\n## Other\n\nhttps://stedolan.github.io/jq/download/\n\n# Run\n\n### Run Globally\n\nLinux or git bash on Windows.\n\nRun from this repo root.\n\n```\n./set-aliases.sh\n```\n\nRun from home dir or restart terminal:\n\n```\nsource ~/.bashrc\n```\n\n### Get Session Token\n\nTo get a session token for `my_user`:\n\n~/.aws/credentials\n```\n[my_user]\naws_access_key_id = \u003cID\u003e\naws_secret_access_key = \u003cSECRET\u003e\n```\n\n~/.aws/config\n```\n[profile my_user]\nregion = eu-central-1\noutput = json\nmfa_serial = arn:aws:iam::\u003cACC_ID\u003e:mfa/my_user\n```\n\nRun:\n\n```\n./get-session-token.sh\n```\n\nChoose:\n\n```\nmy_user\n```\n\nThe temporary credentials will be stored as profile:\n\n```\n[my_user_temp]\naws_access_key_id = \u003cID\u003e\naws_secret_access_key = \u003cSECRET\u003e\naws_session_token = \u003cTOKEN\u003e\n```\n\n### Assume Role\n\nTo get a session token for `my_user_deployment_role`:\n\n~/.aws/credentials\n```\n[my_user]\naws_access_key_id = \u003cID\u003e\naws_secret_access_key = \u003cSECRET\u003e\n```\n\nNote - use `[profile ...`\n\n~/.aws/config\n```\n[profile my_user]\nregion = eu-central-1\noutput = json\nmfa_serial = arn:aws:iam::\u003cACC_ID\u003e:mfa/my_user\n\n[profile my_user_deployment_role]\nregion = eu-central-1\noutput = json\nsource_profile = my_user\nrole_arn = arn:aws:iam::\u003cACC_ID\u003e:role/deployment_role\n```\n\nRun:\n\n```\n./assume-role.sh\n```\n\nChoose:\n\n```\nmy_user_deployment_role\n```\n\nThe temporary credentials will be stored as profile:\n\n```\n[my_user_deployment_role_temp]\naws_access_key_id = \u003cID\u003e\naws_secret_access_key = \u003cSECRET\u003e\naws_session_token = \u003cTOKEN\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyfactory%2Faws-sts-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazyfactory%2Faws-sts-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyfactory%2Faws-sts-helper/lists"}