Search code examples
amazon-web-servicescentos

Private key authentication has been deprecated from the CLI


I got this error while trying to get the AWS regions using the "ec2-describe-regions"

Private key authentication has been deprecated from the CLI. Please refer to the following documentation for more details: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-soap-api.html

But I have the latest version of AWS CLI tools (Version : 1.7.1.3 2014-09-01)

In my .bashrc file here is the configuration :

export JAVA_HOME=/usr/bin/java
export EC2_BASE=/opt/ec2
export EC2_HOME=$EC2_BASE/tools
export EC2_URL=https://console.aws.amazon.com/console/home?region=us-west-1
export AWS_ACCOUNT_NUMBER=XXXXXXXXXXXX
export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXX
export AWS_SECRET_KEY=XXXXXXXXXXXXXXXXXXXX
export PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$EC2_HOME/bin

So can anyone please help me to resolve this….. :) Any help would be greatly appreciated.

Thank You.


Solution

  • Looking at the docs of the EC2 CLI version > 1.6.13.0, the supported variables are AWS_ACCESS_KEY, not AWS_ACCESS_KEY_ID.