{ "info": { "author": "Ashley Gould", "author_email": "agould@ucop.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "==============\naws-shelltools\n==============\n\n\nYet another set of scripts and shell functions for managing AWS profiles\nand cross account access.\n\n\n**Install**\n\nInstall into python virual environment::\n\n source ~/path-to-venv/bin/activate\n pip install aws-shelltools\n\nInstall from editable local repository::\n\n git clone https://github.com/ucopacme/aws-shelltools\n cd aws-shelltools\n pip install -r requirements.txt\n pip install -e .\n\n\n**Uninstall**::\n\n pip uninstall aws-shelltools\n\n\n**Configure**::\n\n aws-shelltools-setup\n . ~/.bashrc\n\n\nThe shelltools:\n---------------\n\naws-profile\n Set or display value of shell environment var AWS_PROFILE\n\naws-region\n Set or display value of shell environment var AWS_DEFAULT_PROFILE\n\naws-env\n Print current values of all AWS environment vars\n\naws-set-mfa-token\n Request temporary session credentials from AWS STS. Export these credentials\n to environment vars in the current shell.\n\naws-make-config\n Generate aws client config file by listing group assume role policies. You\n must set your MFA token before you run this command.\n\naws-list-roles\n Print list of available AWS assume role profiles.\n\naws-assume-role\n Run 'aws sts assume-role' operation to obtain temporary assumed role\n credentials for the specified profile. Export these credentials to\n environment vars in the current shell.\n\naws-refresh\n Reset mfa token. If environment var AWS_ASSUMED_ROLE_PROFILE is already\n set from a previous session, then rerun 'aws sts assume-role' operation\n for that profile.\n\naws-display-assumed-role\n Print current values of AWS assumed role environment vars\n\naws-whoami\n Print output of 'aws sts get-caller-identity\n\naws-export-env\n Cache AWS environment vars to local file for use by other shells\n\naws-import-env\n Evaluate cached AWS evironment vars into current shell\n\naws-drop-assumed-role\n Reset AWS session environment vars to values prior to assuming role\n\naws-unset-mfa-token\n Unset all AWS session token environemt vars\n\n\n\n**Usage**::\n\n # Run each command with -h option for full usage info.\n\n aws-profile []\n aws-region []\n aws-set-mfa-token\n aws-make-config\n aws-list-roles\n aws-assume-role \n aws-refresh\n\n aws-display-assumed-role\n aws-whoami\n aws-env\n aws-export-env\n aws-import-env\n\n aws-drop-assumed-role\n aws-unset-mfa-token\n\n\nConfigure Assume Role Profiles\n------------------------------\n\nIf you have not yet set up your AWS CLI access, skip to section `Awscli/Python Setup`_\nbefore proceeding.\n\nSet your MFA token and assume role to one of your configured assume role profiles::\n\n (python3.6) ashleygould$ aws-set-mfa-token \n please enter 6 digit token code for your MFA device: 351918\n (python3.6) ashleygould$ aws-assume-role ashley-training-OrgAdmin\n (python3.6) ashleygould$ aws-whoami \n {\n \"UserId\": \"AROAIMADVT2W7CODNCP7W:agould@ashley-training-OrgAdmin\",\n \"Account\": \"111111111111\",\n \"Arn\": \"arn:aws:sts::111111111111:assumed-role/OrgAdmin/agould@ashley-training-OrgAdmin\"\n }\n\nNow you can run `aws-make-config` to generate your assume role profiles based\non your group membership in a central *auth* account. These are written to\n`~/.aws/config.d/config.aws_shelltools`::\n\n (python3.6) ashleygould$ aws-make-config\n (python3.6) ashleygould$ head ~/.aws/config.d/config.aws_shelltools \n [profile ashley-training-OrgAdmin]\n role_arn = arn:aws:iam::111111111111:role/awsauth/OrgAdmin\n role_session_name = agould@ashley-training-OrgAdmin\n source_profile = default\n\n [profile Auth-OrgAdmin]\n role_arn = arn:aws:iam::222222222222:role/awsauth/OrgAdmin\n role_session_name = agould@Auth-OrgAdmin\n source_profile = default\n\nSee a listing or all your available AWS profiles::\n\n (python3.6) ashleygould$ aws-list-roles \n profile Auth-OrgAdmin\n profile OrgMaster-OrgAdmin\n profile ashley-training-OrgAdmin\n profile eas-dev-OrgAdmin\n profile eas-prod-OrgAdmin\n\n\nYou can shorten the profile name at the command line to a unique prefix::\n\n (python3.6) ashleygould$ aws-assume-role eas\n Your specified profile 'eas' matches multiple configured profiles. Select one from \n the list below and try again: \n eas-dev-OrgAdmin eas-prod-OrgAdmin \n ucop-itssandbox-eas-OrgAdmin\n (python3.6) ashleygould$ aws-assume-role eas-dev\n (python3.6) ashleygould$ aws-whoami \n {\n \"UserId\": \"AROAJFPJVRDRDFUZJLZVG:agould@eas-dev-OrgAdmin\",\n \"Account\": \"111111111111\",\n \"Arn\": \"arn:aws:sts::111111111111:assumed-role/OrgAdmin/agould@eas-dev-OrgAdmin\"\n }\n\n\n\n\nAwscli/Python Setup\n-------------------\n\nThe above install insturctions assume you have a working knowledge of python\nand awscli. If you are new at this, refer to the excellent AWS documentation:\nhttps://docs.aws.amazon.com/cli/latest/userguide/installing.html\n\nThis covers installation of python and python virtual environments for Linux,\nMacOS, and Windows. Once your python is happy, running the installation of\n`aws-shelltools` will ensure `awscli`and `boto3` are also properly installed.\n\n\n\n\nAWS Access Key Setup\n--------------------\n\nBefore you can use any of this stuff, you must create your AWS access key and\nsecret access key and confiture your AWS shell profile. see:\nhttps://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html\n\nLog into AWS console and create an AWS Access key as per AWS doc. From your\nshell run the `aws configure` command and cut-n-paste your access key/secret\nkey from the console to the command line as prompted. This creates your\n`default` profile::\n\n (python3.6) ashleygould$ aws configure\n AWS Access Key ID [None]: AKI**********W5AFPSNQ\n AWS Secret Access Key [None]: U/QotA**********************543vuYB\n Default region name [None]: us-west-2\n Default output format [None]:\n\n (python3.6) ashleygould$ cat .aws/config \n [default]\n region = us-west-2\n\n (python3.6) its-agould-9m:~ ashleygould$ aws-whoami \n {\n \"UserId\": \"AIDAJ2SLREGRDKVFOB6CI\",\n \"Account\": \"112233445566\",\n \"Arn\": \"arn:aws:iam::112233445566:user/awsauth/orgadmin/agould\"\n }\n\nWorking With Codecommit Repositories\n------------------------------------\n\nTo access codecommit repositories from the commandline after assuming a role,\nyou must first configure git to use the AWS codecommit credential-helper::\n\n git config --global credential.helper '!aws codecommit credential-helper $@'\n git config --global credential.UseHttpPath true\n\n\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ashleygould/aws-shelltools", "keywords": "aws awscli session", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aws-shelltools", "package_url": "https://pypi.org/project/aws-shelltools/", "platform": "", "project_url": "https://pypi.org/project/aws-shelltools/", "project_urls": { "Homepage": "https://github.com/ashleygould/aws-shelltools" }, "release_url": "https://pypi.org/project/aws-shelltools/0.1.5/", "requires_dist": [ "awscli", "boto3", "botocore", "docopt", "aws-orgs" ], "requires_python": "", "summary": "Yet another set of scripts and shell functions for managing AWS profiles and cross account access.", "version": "0.1.5" }, "last_serial": 5288625, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "22f3ebdd37b804273cb52831c3984db1", "sha256": "48e111854a29e3d38c81dedb269ce04e40df2a4e83141f1bbdb735b7e0471a67" }, "downloads": -1, "filename": "aws_shelltools-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "22f3ebdd37b804273cb52831c3984db1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12997, "upload_time": "2019-05-17T19:49:34", "url": "https://files.pythonhosted.org/packages/ec/7e/34f1552c73763ad113d4bab07a03bcf6f4cb6247464ef80e6fead7311f80/aws_shelltools-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "051385b7f8d4f1916ea597ab39ec2d49", "sha256": "69180a3182e8c28665bbbbbdacdab67df509bca707b5cabc2a4eb490e7aeca70" }, "downloads": -1, "filename": "aws-shelltools-0.1.3.tar.gz", "has_sig": false, "md5_digest": "051385b7f8d4f1916ea597ab39ec2d49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11678, "upload_time": "2019-05-17T19:49:36", "url": "https://files.pythonhosted.org/packages/a0/38/85da28b5e0595b9fe2c47a2363ed507fd694a03b6b7515a75b7f71026aa2/aws-shelltools-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "288b2c8bd5d2ea2823eb40f2a39e4c5d", "sha256": "5fdc9bb30ae425b9db139824c25b3498a2529cada5c4b5fab192c9a8e97a9b07" }, "downloads": -1, "filename": "aws_shelltools-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "288b2c8bd5d2ea2823eb40f2a39e4c5d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12975, "upload_time": "2019-05-17T20:01:16", "url": "https://files.pythonhosted.org/packages/73/47/59e8b4568ffe9fa16022bbc7734d3168b4f947de5b1279837346f170d42d/aws_shelltools-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b869745d83e6e2104598343235d66acb", "sha256": "ae29eebe5e3890d082b1d9288685958fe9906a5cd39ef2a7b7d677d967e76dd2" }, "downloads": -1, "filename": "aws-shelltools-0.1.4.tar.gz", "has_sig": false, "md5_digest": "b869745d83e6e2104598343235d66acb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11538, "upload_time": "2019-05-17T20:01:17", "url": "https://files.pythonhosted.org/packages/45/5f/e45acd0968fd4dc2ecb16b46c1a0674f8ad5a8f05dfbe76f5f64eabdfa7a/aws-shelltools-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "4856effbc5a979fd71c95b9470a72236", "sha256": "1db4f5fa89a7ef3c2bd4533a6d59c1603afa15e097e64755f220d849dd542e8a" }, "downloads": -1, "filename": "aws_shelltools-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4856effbc5a979fd71c95b9470a72236", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12945, "upload_time": "2019-05-19T15:50:34", "url": "https://files.pythonhosted.org/packages/35/47/a3e8e4ec6e842098ca2064a6f918052261d046091cded5e9b1a414476dae/aws_shelltools-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac8c14b6479c6e4803c8caaecc9f242f", "sha256": "f4529f9241dc8769ccf48b104c90150d5e19c8a13dae096dc4021a56a9ef236b" }, "downloads": -1, "filename": "aws-shelltools-0.1.5.tar.gz", "has_sig": false, "md5_digest": "ac8c14b6479c6e4803c8caaecc9f242f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11519, "upload_time": "2019-05-19T15:50:37", "url": "https://files.pythonhosted.org/packages/fe/12/bf12bacaa090f5e137d717335087638d91cf58d7c96b31c7bfdb323f83fd/aws-shelltools-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4856effbc5a979fd71c95b9470a72236", "sha256": "1db4f5fa89a7ef3c2bd4533a6d59c1603afa15e097e64755f220d849dd542e8a" }, "downloads": -1, "filename": "aws_shelltools-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4856effbc5a979fd71c95b9470a72236", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12945, "upload_time": "2019-05-19T15:50:34", "url": "https://files.pythonhosted.org/packages/35/47/a3e8e4ec6e842098ca2064a6f918052261d046091cded5e9b1a414476dae/aws_shelltools-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac8c14b6479c6e4803c8caaecc9f242f", "sha256": "f4529f9241dc8769ccf48b104c90150d5e19c8a13dae096dc4021a56a9ef236b" }, "downloads": -1, "filename": "aws-shelltools-0.1.5.tar.gz", "has_sig": false, "md5_digest": "ac8c14b6479c6e4803c8caaecc9f242f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11519, "upload_time": "2019-05-19T15:50:37", "url": "https://files.pythonhosted.org/packages/fe/12/bf12bacaa090f5e137d717335087638d91cf58d7c96b31c7bfdb323f83fd/aws-shelltools-0.1.5.tar.gz" } ] }