Add support for AWS_PROFILE when authMechanism is MONGODB-AWS
Currently, when using MONGODB-AWS, it can only read the following variables:
AWS ACCESS KEY ID
AWS SECRET ACCESS KEY
AWS SESSION TOKEN
which forces you to export credentials or to paste them in the CLI.
AWS has a variable called AWS_PROFILE that will fetch the required values from your credential file, without having to paste them again. This variable is supported by anything using AWS SDK, so mongosh should have support for it as well.
Cristian shared this idea