Use GSuite accounts for AWS
Gsuite Admin Help
AWS Docs
GSuite Admin > Users > Manage user attributes
- Add AWS SAML Role Attribute (Text, Multi-value)
- (Optional) Add AWS SAML RoleSessionName Attribute (Text, Single Value)
Name ID = Basic Information > Primary Email
Name ID Format = Email
Set Attribute Mapping (AWS Docs)
https://aws.amazon.com/SAML/Attributes/RoleSessionName
https://aws.amazon.com/SAML/Attributes/Role
https://aws.amazon.com/SAML/Attributes/SessionDuration
Set a friendly name
Set provider type to SAML
Select the Gsuite IDP Metadata (XML file)
For this example we will create 2 roles, 1 administrator and 1 Read only role
If an user has 2+ assigned roles, he can chose the desired role
AWS > IAM > Access management > Roles > Create role
Select AdministratorAccess policy
Name: Administrator
Do the same as for Administrator but with the ViewOnlyAccess policy
Name: ViewOnlyAccess
As we can see here we have now 2 new roles Administrator and ViewOnlyAccess
Format of the AWS SAML Role Attribute:
arn:aws:iam::account-number:role/role-name1,arn:aws:iam::account-number:saml-provider/provider-name
SAML SessionDuration Attribute in seconds
- Create GSuite Groups and auto assign roles based on the user's groups