Earlier I was getting a security error using a clean install of the Amazon Web Services CLI on a new EC2 instance. After triple checking my keys in the IAM Management console I figured out there was something else going on. Hopefully this helps anyone who is running into the same problem & searching for solution.
The initial installation of the AWS CLI tools is pretty straight forward. On a Debian machine the following should work.
sudo apt-get install -y python-pip
sudo pip install awscli
I’ve found the best way to configure your security settings is using aws configure which is covered here here
Once you’ve configured AWS CLI it’s recommended you run a simple test such as:
aws ec2 describe-regionsThe security error I kept getting when running the command looked like this:
A client error (AuthFailure) occurred: AWS was not able to validate the provided access credentialsIf you are seeing a similar error double check that your system clock is in sync with a time server. If it’s just a minute ahead your credentials will fail silently.