AWS/CLI
From r00tedvw.com wiki
(Difference between revisions)
Line 24: | Line 24: | ||
<nowiki>~$ aws --version | <nowiki>~$ aws --version | ||
aws-cli/1.16.145 Python/3.6.6 Linux/3.10.0-957.10.1.el7.x86_64 botocore/1.12.135</nowiki> | aws-cli/1.16.145 Python/3.6.6 Linux/3.10.0-957.10.1.el7.x86_64 botocore/1.12.135</nowiki> | ||
+ | |||
+ | =Credentials= | ||
+ | Get your access and secret keys from: | ||
+ | *AWS Management Console > [click] username > [click] My Security Credentials | ||
+ | *[click] Create access key > [copy] Access Key ID > [click] Show secret access key > [copy] secret access key | ||
+ | **'''NOTE:''' you will never be able to access the secret access key again. Make sure you copy it, otherwise you'll have to create a new key. | ||
+ | ==Credentials for role user== | ||
+ | Say you want to get an access and secret key for a role user that you can switch to: | ||
+ | *AWS Management Console > [click] services > [click] IAM under Security, Identity, & Compliance > [click] Users | ||
+ | *Add User > give them a user name > select "Programmatic access" for the Access type > for permissions I assigned "AdministratorAccess". | ||
+ | *[click] on the new user under Users > [click] Security Credentials tab > create access key > copy access and secret keys. | ||
+ | **'''NOTE:''' you will never be able to access the secret access key again. Make sure you copy it, otherwise you'll have to create a new key. |
Revision as of 10:15, 25 April 2019
Quick Reference | AWS CLI
Installation (CentOS7)
Install EPEL
~$ sudo yum install -y epel-release sudo yum makecache
Find and install PIP
~$ sudo yum search pip | grep python3 python34-pip.noarch : A tool for installing and managing Python3 packages python36-pip.noarch : A tool for installing and managing Python3 packages ~$ sudo yum install -y python36-pip
Verify PIP
~$ pip3 -V pip 8.1.2 from/usr/lib/python3.6/site-packages (python 3.6)
Upgrade PIP
~$ sudo pip3 install --upgrade pip ~$ pip -V pip 19.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
Install AWS CLI
~$ $ pip search awscli | grep "awscli (" okta-awscli (0.4.0) - Provides a wrapper for Okta authentication to awscli awscli (1.16.145) - Universal Command Line Environment for AWS. ~$ pip install awscli --upgrade --user
Verify AWS CLI
~$ aws --version aws-cli/1.16.145 Python/3.6.6 Linux/3.10.0-957.10.1.el7.x86_64 botocore/1.12.135
Credentials
Get your access and secret keys from:
- AWS Management Console > [click] username > [click] My Security Credentials
- [click] Create access key > [copy] Access Key ID > [click] Show secret access key > [copy] secret access key
- NOTE: you will never be able to access the secret access key again. Make sure you copy it, otherwise you'll have to create a new key.
Credentials for role user
Say you want to get an access and secret key for a role user that you can switch to:
- AWS Management Console > [click] services > [click] IAM under Security, Identity, & Compliance > [click] Users
- Add User > give them a user name > select "Programmatic access" for the Access type > for permissions I assigned "AdministratorAccess".
- [click] on the new user under Users > [click] Security Credentials tab > create access key > copy access and secret keys.
- NOTE: you will never be able to access the secret access key again. Make sure you copy it, otherwise you'll have to create a new key.