Using Console
AdministratorAccess
policy attached.AdministratorAccess
policy attached.AdministratorAccess
policy to their account.Using CLI
AdministratorAccess
.
AdministratorAccess
policy. First, create the user:
AdministratorAccess
policy:
Using Python
MIN_ADMINS
variable is set to the minimum number of administrators required.get_iam_users
function retrieves all IAM users.is_admin
function checks if a user has the AdministratorAccess
policy attached.check_admins
function counts the number of users with administrative privileges.main
function checks the number of admins and prints a warning if the count is below the minimum required. You can extend this function to send notifications via email, SNS, or other methods.