Security

Which local file conventionally stores access key credentials shared by the AWS CLI and AWS SDKs?

Show the answer

Correct answerC. ~/.aws/credentials

AWhy not this: The CLI alias file defines command aliases rather than credential profiles.

BWhy not this: The models directory holds custom service models rather than credentials.

CWhy this is right: The shared credentials file is the conventional location for profile-based access key credentials.

DWhy not this: The config file primarily holds AWS configuration; it is not the conventional shared credentials file.

The shared credentials file, normally ~/.aws/credentials, stores access key credentials in profiles. The ~/.aws/config file primarily stores configuration such as Regions, output formats, and role settings, although it can also contain credentials.