aws:sso
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| aws:sso [23/05/2025 13:32] โ created andrew | aws:sso [18/09/2025 15:27] (current) โ [Automating SSO] andrew | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Automating SSO ====== | ====== Automating SSO ====== | ||
| + | AWS sso has changed, so if you are running this on a headless system over ssh for example, use '' | ||
| + | |||
| + | |||
| + | < | ||
| + | SSO session name (Recommended): | ||
| + | SSO start URL [None]: https:// | ||
| + | SSO region [None]: eu-west-1 | ||
| + | SSO registration scopes [sso: | ||
| + | Attempting to automatically open the SSO authorization page in your default browser. | ||
| + | If the browser does not open or you wish to use a different device to authorize this request, open the following URL: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Then enter the code: | ||
| + | |||
| + | ABCD-EFGH | ||
| + | </ | ||
| + | {{: | ||
| + | |||
| + | Click Allow Access, you can then close your tab / browser session. | ||
| + | |||
| + | < | ||
| + | There are 8 AWS accounts available to you. | ||
| + | Using the account ID 123412341234 | ||
| + | There are 3 roles available to you. | ||
| + | Using the role name " | ||
| + | Default client Region [None]: eu-west-1 | ||
| + | CLI default output format (json if not specified) [None]: json | ||
| + | Profile name [AdministratorAccess-123412341234]: | ||
| + | To use this profile, specify the profile name using --profile, as shown: | ||
| + | |||
| + | aws sts get-caller-identity --profile MyDeploymentRole | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Deriving SSO URL ===== | ||
| + | |||
| + | The URL for the SSO sign in can be derived programatically: | ||
| < | < | ||
| SSO uses the URL:- | SSO uses the URL:- | ||
| - | https://d-1a2345da26.awsapps.com/ | + | https://d-1a2345ab23.awsapps.com/ |
| The d-xxxx is the Identity Store Directory id | The d-xxxx is the Identity Store Directory id | ||
| $ aws sso-admin list-instances | jq -r .Instances[]." | $ aws sso-admin list-instances | jq -r .Instances[]." | ||
| - | 1a2345da26 | + | d-1a2345da26 |
| </ | </ | ||
aws/sso.1748007121.txt.gz ยท Last modified: by andrew
