
上QQ阅读APP看书,第一时间看更新
Installing the AWS CLI
The AWS CLI is written in Python, and therefore you must have either Python 2 or Python 3 installed, along with the PIP Python package manager.
The instructions and examples used throughout this book assume a MacOS or Linux environment.
For instructions on how to set up the AWS CLI using Windows, refer to https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html.
For instructions on how to set up the AWS CLI using Windows, refer to https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html.
Assuming you have met these prerequisites, you can install the AWS CLI in a terminal using the pip command, along with the --upgrade flag to upgrade to the latest AWS CLI version if already installed, and the --user flag to avoid modifying your system libraries:
> pip install awscli --upgrade --user
Collecting awscli
Downloading https://files.pythonhosted.org/packages/69/18/d0c904221d14c45098da04de5e5b74a6effffb90c2b002bc2051fd59222e/awscli-1.15.45-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 1.2MB/s
...
...
Successfully installed awscli-1.15.45 botocore-1.10.45 colorama-0.3.9 pyasn1-0.4.3 python-dateutil-2.7.3
Depending on your environment, if you are using Python 3, you may need to replace the pip install command with pip3 install.
If you now attempt to run an AWS CLI command, the command will fail, indicating that you must configure your environment:
> aws ec2 describe-vpcs
You must specify a region. You can also configure your region by running "aws configure".