Automating SSO

AWS sso has changed, so use aws configure sso –use-device-code

SSO uses the URL:-
https://d-1a2345da26.awsapps.com/start/#

The d-xxxx is the Identity Store Directory id

$ aws sso-admin list-instances | jq -r .Instances[]."IdentityStoreId"
d-1a2345da26