Install the AWS CLI version 2. Follow the instructions on aws-cli-getting-started
Set the configuration settings and credentials of the AWS CLI by creating credentials and config files as described in aws-cli-configure-files.
If the AWS CLI configuration is not set to the default values, then make sure to explicitly set some environment variables tp be picked up by the tools cmd such as:
AWS_SHARED_CREDENTIALS_FILE. See the full list of variables in aws-cli-configure-envvars
Note that it is important to configure with the correct region for the bucket being used on S3. If region is not set, the AWS SDK will choose a default value that may not be valid. In addition, the tools CLI by inspects
AWS_SECRET_ACCESS_KEYemvironment variables if the credentials could not be pulled from the credential files.
In order to be able to run tools that require SSH on the EMR nodes (i.e., bootstrap), then:
make sure that you have SSH access to the cluster nodes; and
create a key pair using Amazon EC2 through the AWS CLI command
aws ec2 create-key-pairas instructed in aws-cli-create-key-pairs.