So I had an observation about AWS scripting that I&#x27;d like to share. I&#x27;ve been working on some AWS scripts lately for both personal projects and stuff we deploy at work, which means that I often use 2 sets of credentials.<p>A lot of people on Github&#x2F;SO seem to like to set their AWS credentials as env variables in their scripts. I was doing this myself (since it seemed like the established pattern), but then found out aws cli has a --profile option. You store everything in the ~&#x2F;.aws&#x2F;credentials file instead of on an env variable and simply switch the profile you use when executing the script.<p>This works better for me when managing multiple credentials and doesn&#x27;t allow the off-chance of uploading my credentials to a remote git repo. I was curious if people just didn&#x27;t know about this option or if setting your credentials within the script is preferred for some reason.