Install the AWS CLI
You can install the latest version of the AWS CLI for macOS, Linux, or Windows.
To set up Amazon EMR on EKS, you must have the latest version of AWS CLI installed.
To install or update the AWS CLI for macOS
If you currently have the AWS CLI installed, determine which version that you have installed.
aws --version
If you have an earlier version of AWS CLI, then use the following command to install the latest AWS CLI version 2. For other installation options, or to upgrade your currently installed version 2, see Upgrading the AWS CLI version 2 on macOS.
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" sudo installer -pkg AWSCLIV2.pkg -target /
If you're unable to use the AWS CLI version 2, then ensure that you have the latest version of the AWS CLI version 1 installed using the following command.
pip3 install awscli --upgrade --user
To install or update the AWS CLI for Linux
If you currently have the AWS CLI installed, determine which version that you have installed.
aws --version
If you have an earlier version of AWS CLI, then use the following command to install the latest AWS CLI version 2. For other installation options, or to upgrade your currently installed version 2, see Upgrading the AWS CLI version 2 on Linux.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install
If you're unable to use the AWS CLI version 2, then ensure that you have the latest version of the AWS CLI version 1 installed using the following command.
pip3 install --upgrade --user awscli
To install or update the AWS CLI for Windows
If you currently have the AWS CLI installed, determine which version that you have installed.
aws --version
If you have an earlier version of AWS CLI, then use the following command to install the latest AWS CLI version 2. For other installation options, or to upgrade your currently installed version 2, see Upgrading the AWS CLI version 2 on Windows.
-
Download the AWS CLI MSI installer for Windows (64-bit) at https://awscli.amazonaws.com/AWSCLIV2.msi
-
Run the downloaded MSI installer and follow the onscreen instructions. By default, the AWS CLI installs to C:\Program Files\Amazon\AWSCLIV2.
If you're unable to use the AWS CLI version 2, then ensure that you have the latest version of the AWS CLI version 1 installed using the following command.
pip3 install --user --upgrade awscli
-
Configure your AWS CLI credentials
Both eksctl and the AWS CLI require that you have AWS credentials configured in your
environment. The aws configure
command is the fastest way to set up your AWS CLI installation for general use.
$ aws configure AWS Access Key ID [None]: <AKIAIOSFODNN7EXAMPLE> AWS Secret Access Key [None]: <wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY> Default region name [None]: <region-code> Default output format [None]: <json>
When you type this command, the AWS CLI prompts you for four pieces of information:
Access key, secret access key, AWS Region, and output format. This information is stored in
a profile (a collection of settings) named default
. This profile is used when
you run commands unless you specify another one. For more information, see Configuring
the AWS CLI in the AWS Command Line Interface User Guide.