Where is AWS Config and Credential files located on Mac


If you made use of the aws configure command to set up the access and secret keys to your AWS Profile to run CLI commands and you are wondering where are these details stored on your Mac? Well, these details are stored under your home directory under a hidden .aws folder.

Steps to locate AWS Config Files

cd ~/.aws
ls -l

-rw-------  1 c2ctechtv  staff   44 Aug 10 00:25 config
-rw-------  1 c2ctechtv  staff  116 Aug  9 22:22 credentials
drwxr-xr-x  3 c2ctechtv  staff   96 Aug 10 00:34 sso
cat config

[default]
region = us-east-2
output = table
cat credentials

[default]
aws_access_key_id = XXAAYMUHEUKMZMW2HJK2
aws_secret_access_key = jXAemA2uI6aX1iypqUbSQ5ZKonJQYNI2hpOYhwAd 
Location of AWS Config file on Mac

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap