Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Command Line Interface Unable to Locate Credentials - Special Permissions

Tags:

Okay, so I've encountered an insanely frustrating problem while trying to reach an AWS S3 Bucket through AWS CLI via the command prompt in Windows 7. The AWS CLI is "unable to locate credentials" a.k.a. the config.txt file @ C:\Users\USERNAME\.aws\config.txt.

I've tried pathing to it by creating the AWS_CONFIG_FILE environmental variable in ControlPanel>System>AdvancedSystemSettings>EnvironmentalVariables, but no dice. I've also tried all of the above on another Win7 machine. Again, no dice.

What could I be missing here. Are there any special permission that need to be set for AWS CLI to accest config.txt? Help, before I poke my own eyes out!

The contents of config.txt, in case you're interested, are:

[default]
aws_access_key_id = key id here
aws_secret_access_key = key here
region = us-east-1
like image 426
RoboArch Avatar asked Sep 23 '13 19:09

RoboArch


People also ask

How do you fix unable to locate credentials you can configure credentials by running AWS configure?

An "Unable to locate credentials" error indicates that Amazon S3 can't find the credentials to authenticate AWS API calls. To resolve this issue, make sure that your AWS credentials are correctly configured in the AWS CLI.

Why my AWS CLI is not working?

If the aws command cannot be found after first installing or updating the AWS CLI, you might need to restart your terminal for it to recognize any PATH updates. If the aws command cannot be found after first installing or updating the AWS CLI, it might not have been fully installed.

How do I find my AWS credentials in terminal?

You can retrieve any credentials or configuration settings you've set using aws configure get . Specify the profile that you want to view or modify with the --profile setting. For example, the following command retrieves the region setting in the profile named integ .

Which AWS CLI command is used to authenticate to AWS?

If you use profiles to authenticate commands using the AWS CLI, specify the --profile option followed by the profile name to verify that the calls authenticate using MFA. For example, this command uses the default profile credentials and isn't authenticated with MFA.


1 Answers

There is a another way to configure aws credentials while using command line tool. You can pass credentials using windows command instead of passing through file. Execute below command from windows command prompt

aws configure 

It prompt you to enter below things

AWS Access key ID:
AWS secrete key ID:
Default region Name:
Default output Format:

See this video tutorial: https://youtu.be/hhXj8lM_jBs

like image 120
Firoz Sabaliya Avatar answered Oct 26 '22 08:10

Firoz Sabaliya