The mechanism in which boto3 looks for credentials is to search through a list of possible locations and stop as soon as it finds credentials. The order in which Boto3 searches for credentials is…
Look at the documentation for the ‘configure’ command. You can store multiple profiles in your aws credentials file ( though you have to edit the file to do so ), but the recommended approach is to store the key and secret in ephemeral environment variables so they can’t be scraped from the file.