Bobcares

.aws Directory Not Found | Troubleshooting tips

by | Sep 14, 2022

Let’s take a closer look at the “.aws directory not found” issue in this article. Bobcares, as a part of our AWS Support Services offers solutions to every AWS query that comes our way.

“.aws directory not found.” Why?

The shared AWS

configCopy Code
and
credentialsCopy Code
files are plaintext files that are stored by default in the “home” folder on the computer. On Linux and macOS, this is usually displayed as ~/.aws and the default location of files is
~/.aws/configCopy Code
~/.aws/credentialsCopy Code
. It is %USERPROFILE%\.aws on Windows and the default location of files is
%USERPROFILE%\.aws\configCopy Code
%USERPROFILE%\.aws\credentialsCopy Code
.

.aws directory not found

At the start of the path, a ~/ or ~  followed by the file system’s default path separator resolves by checking, in order,

  • The
    HOMECopy Code
    environment variable.
  • The
    USERPROFILECopy Code
    environment variable.
  • The
    HOMEDRIVECopy Code
    environment variable links with
    HOMEPATHCopy Code
    environment variable.
  • An SDK or tool-specific home path resolution function or variable.

If a user’s home directory is at the beginning of the path, it resolves to the user name’s home directory whenever possible.

Changing the file’s default location:

In order to change the location or name of these files from the default to a custom value, use the following environment variables.

On Linux or macOS, we can specify an alternate location by running the following export commands.

$ export AWS_CONFIG_FILE=/some/file/path/on/the/system/config-file-name
$ export AWS_SHARED_CREDENTIALS_FILE=/some/other/file/path/on/the/system/credentials-file-name

On Windows, we can specify an alternate location by running the following setx commands.

C:\> setx AWS_CONFIG_FILE c:\some\file\path\on\the\system\config-file-name
C:\> setx AWS_SHARED_CREDENTIALS_FILE c:\some\other\file\path\on\the\system\credentials-file-name

Folders beginning with . are hidden folders. Users can create them from the command prompt in Windows or Linux by typing mkdir. If we install aws-cli and then run the aws configure command, it result in the creation of this folder in the home folder automatically. When we run the above command, we must supply the default AWS region, AWS access, and secret key on the command prompt. Once we provide that, this creates the following two files in the.aws folder:

configCopy Code
and
credentialsCopy Code
.

The AWS access and secret key will be present in the credentials file. AWS uses this as an authorization mechanism. It is extremely useful when directly accessing AWS resources via command line or creating AWS clients computationally.

To fix “.aws directory not found.” issue:

The .aws folder is in the adminstrator account (user), so keep that in mind while working, because if we don’t have admin power, then login through that and then check for C:UsersAdministrator.aws.

[Looking for a solution to another query? We are just a click away.]

Conclusion

In this article, we provides a simple troubleshooting method from our Support team to the issue, “.aws directory not found.”

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!