Ubuntu – AWS-CLI – Can’t find the config even through it exists

amazon ec2amazon-web-servicesaws-clibashUbuntu

I installed Amazon Command Line Tools (AWS-CLI) using:

pip install awscli

It installed successfully. I then created a file in this location: /opt/aws/aws_cred.txt

[default]
aws_access_key_id = XYZ
aws_secret_access_key = XYZ
region = XYZ

Then I ran this command:

export AWS_CONFIG_FILE=”/opt/aws/aws_cred.txt”

Then I get this when I try to run this command: aws ec2 describe-regions

botocore.exceptions.ConfigNotFound:
The specified config file (”/opt/aws/aws_cred.txt”)
could not be found.

What else could I do? Does it need to be executable, owned by a certain user, what? The file is definitely there but it can't find it.

Best Answer

Compare

export AWS_CONFIG_FILE=”/opt/aws/aws_cred.txt”

and

export AWS_CONFIG_FILE="/opt/aws/aws_cred.txt"

(Hint: one uses "smart" quotes.)

Edit: to be less oblique, your use of smart quotes is causing the problem.

Related Topic