A library to help automate AWS SSO activities as it is still not supported by Boto
This library is now part https://github.com/schubergphilis/awsapilib and thus all development on this repo will stop.
The library supports below AWS SSO actions:
- Get Groups
- Get Users
- Get Accounts
- Create Permission Sets
- Assign custom policy to a permission set
- Update Permission sets
- Associate user/groups to an Account with a particular permission set
- Disassociate user/groups from an Account with a particular permission set
import os
from awsssolib.awsssolib import Sso
os.environ['AWS_ACCESS_KEY_ID']=''
os.environ['AWS_SECRET_ACCESS_KEY']=''
os.environ['AWS_DEFAULT_REGION']=''
os.environ['AWS_SESSION_TOKEN']=''
sso_connection = Sso('arn:aws:iam::<<account_id>>:role/<<role_name>>')
for group in sso_connection.groups:
print(group.name)
The role should have access to sso and sso-directory