Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the above example, Python 2.x is installed and the AWS CLI is installed, but using Python 2.x. That's exactly what we don't want.

...

It is beyond the current scope of this article to describe how to install Python 3.5+

...

  • Linux:
  • Mac OS X: 
  • Windows: 
  • Virtual Environment:

Installing AWS CLI

Use the standard instructions from AWS to install the AWS CLI, but be sure that once you have the AWS CLI installed, it is , and the AWS CLI, ensuring that the CLI is using your Python 3.5+ installation. Please note that virtualenv may make it easier to get the AWS CLI installed and using Python 3.5+.

  • Linux:
  • Mac OS X:
  • Windows:
  • Virtual Environment:

  

Install and Configure awscli-login

...

Warning

Don't bother trying to install or use the awscli-login tool until your installed version of the AWS CLI reports that it is using Python 3.5+.

...

You will also need to ensure that pip is using Python 3.5+. That may me you will need to use pip3 in the commands below, instead of plain pip.

Code Block
$ pip install awscli-login
...
$ aws configure set plugins.login awscli_login
...
$ aws login configure
ECP Endpoint URL [None]: https://shibidp-test.cit.cornell.edu/idp/profile/SAML2/SOAP/ECP
Username [None]: <YOUR NETID>
Enable Keyring [False]:
Duo Factor [None]:
Role ARN [None]:
$ 

 

  • Linux:
  • Mac OS X:
  • Windows:
  • Virtual Environment:

 

...

Using awscli-login

Login using defaults:

Code Block
$ aws login
Username [username]: pea1
Password: ********
Factor:
$ aws login
Password: 
Factor: push
Please choose the role you would like to assume:
     Account: 000011112222
         [ 0 ]: shib-cs
     Account: 777788889999
         [ 1 ]: shib-admin
         [ 2 ]: shib-cs
         [ 3 ]: shib-dba
Selection: 1
$ aws sts get-caller-identity
{
    "UserId": "AROAICCPMY7VALLFYHWPA:pea1@cornell.edu",
    "Account": "777788889999",
    "Arn": "arn:aws:sts::777788889999:assumed-role/shib-admin/pea1@cornell.edu"
}