-
Notifications
You must be signed in to change notification settings - Fork 216
Description
Currently, users must specify --identity-provider and --region parameters every time they run q login.
Request: Add a q configure command to store SSO start URL and region persistently, similar to AWS CLI profiles. This would allow q login to work without specifying parameters each time, just like aws sso login.
Proposed example workflow:
q configure # Store settings once
q login # Use stored settings automatically
This would provide the same seamless authentication experience that AWS CLI offers with its profile system. The most ideal outcome would be that ~/.aws/config
profiles be used for q cli logins/profiles or at least that the same file can be used for both the q developer cli and the aws cli/sdks.
My current workflow already requires aws sso login
which I have automated out of my way. Being prompted for free or pro license, start url and region on every q cli login is distracting at best. I have a workaround at the moment where I have hacked together a shell alias to deal with q login on shell init if there is not an active session. This is a fairly hacky workaround but it may help others:
alias qlogin='q login --license pro --identity-provider https://d-<REDACTED>.awsapps.com/start --region us-east-1'
function check_q_logged_in() {
if q whoami > /dev/null 2>&1; then
echo "Q CLI Already Authenticated"
else
echo "Authenticating Q CLI"
qlogin
fi
}
check_q_logged_in