{"id":15893514,"url":"https://github.com/multimeric/awsstsenv","last_synced_at":"2025-04-02T18:15:34.696Z","repository":{"id":85377156,"uuid":"156140673","full_name":"multimeric/AwsStsEnv","owner":"multimeric","description":"Converts the JSON output from AWS STS commands to bash environment variables","archived":false,"fork":false,"pushed_at":"2019-02-19T02:26:00.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T05:23:29.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/multimeric.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":"2018-11-05T00:52:28.000Z","updated_at":"2019-02-19T02:26:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"2677d779-a843-4bb2-a11c-c20828b2a04a","html_url":"https://github.com/multimeric/AwsStsEnv","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/multimeric%2FAwsStsEnv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FAwsStsEnv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FAwsStsEnv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FAwsStsEnv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multimeric","download_url":"https://codeload.github.com/multimeric/AwsStsEnv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866100,"owners_count":20846496,"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-10-06T08:11:24.267Z","updated_at":"2025-04-02T18:15:34.673Z","avatar_url":"https://github.com/multimeric.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AwsStsEnv\n`aws-sts-env` is a simple command line tool that you can use to convert the JSON output of certain `aws sts` commands into bash `export` statements, so you can then use them directly in an environment that needs them as environment variables.\n \n ## Installation\n To install, run\n ```bash\n pip install git+https://github.com/TMiguelT/AwsStsEnv.git#egg=aws_sts_env\n ```\n \n ## Usage\n \nTo use `aws-sts-env`, simply run one of the following commands, and pipe the output into the `aws-sts-env` command:\n* `aws sts get-session-token`\n* `aws sts assume-role`\n* `aws sts assume-role-with-saml`\n* `aws sts assume-role-with-web-identity`\n\nFor instance:\n```bash\naws sts assume-role --role-arn arn:aws:iam::999999999999:role/Administrator --role-session-name some_session_name | aws-sts-env \n```\n\nThis will print out the following text (but with correct values):\n```bash\nexport AWS_ACCESS_KEY_ID='AAAAAAAAAAAAAAAAAAAA'\nexport AWS_SECRET_ACCESS_KEY='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'\nexport AWS_SESSION_TOKEN='cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'\n```\n\nIf you want to export these variables on a remote server etc, you can then copy and paste this text into a `bash`/`zsh` session.\n\nIf you want to export these variables directly, on the same machine you're running the `aws sts` commands, you can execute the result of this command, using `$()`. For instance:\n```bash\n$(aws sts assume-role --role-arn arn:aws:iam::999999999999:role/Administrator --role-session-name some_session_name | aws-sts-env)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fawsstsenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultimeric%2Fawsstsenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fawsstsenv/lists"}