Closed IvanVlasic closed 3 years ago
As a principle we should never use any user credentials for which we didn't get permission. Command line tools should not ask questions if not in interactive mode.
Currently I'm thinking about something like this:
mantil setup --aws_profile=org5
mantil setup --aws_access_key= --aws_secert_key=
mantil setup --use_env (use aws credentials from environment)
If environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set use them.
If AWS config file with single default profile exists use that profile. If multiple profiles exists and AWS_PROFILE is set use that profile.
AWS_PROFILE=org5 mantil bootstrap
If multiple AWS profiles exists, and there is no AWS_PROFILE environment variable set then ask. There should be way to disable all interactive questions -q --quiet.
If no AWS account credentials could be found show message and explain how user can help themselves. If region is not set ask with list of all known AWS regions.
Before going further with bootstrapping show which account id will be used in which region and ask for confirmation.