Setup each account alias (e.g. 0440
) in ~.saml2aws
:
[0440]
app_id =
url = https://yourcompany.okta.com/home/amazon_aws/0oampop23kld3JI9b0x7/272
username = david.norman@example.com
provider = Okta
mfa = PUSH
skip_verify = false
timeout = 0
aws_urn = urn:amazon:webservices
aws_session_duration = 3600
aws_profile = 0440
resource_id =
subdomain =
role_arn = arn:aws:iam::123412341234:role/orchestration-administrator
region = us-east-1
http_attempts_count =
http_retry_delay =
Save whatever the latest raw version of this script to your tmp folder.
wget https://gist.githubusercontent.com/deekayen/7cfbc3c71b57536aba8bc15ccf1ff321/raw/42e3a882e1c73f42b799ae8e0c4038d51a63f7a5/loop_accounts.sh
chmod 755 loop_account.sh
Then login to each account to cache some valid access keys.
saml2aws login -a 0440
saml2aws login -a 0464
saml2aws login -a 1419
saml2aws login -a 5889
Run it and go have lunch.
./loop_accounts.sh
Combine the outputs into a single file of unique services.
cat *.txt | sort | uniq > all.txt