Managing the AWS root user and admin access for a team
AWS says to keep the root user for the few tasks only it can do. Give admins personal sign-ins through IAM Identity Center, and protect and log the root user.
The AWS root user isn’t meant for a team to share day to day, and AWS strongly recommends against using it for everyday work. Give your everyday admins their own sign-ins. Protect the root user with MFA (multi-factor authentication: a second check after the password), and make sure each use leaves a record.
What the root user is
When you create an AWS account, you start with one sign-in that has complete access to every service and resource in it. That sign-in is the root user. It uses the email address and password that created the account.
AWS enforces MFA for the root user by default. If MFA isn’t already on, it has to be registered within 35 days of the first sign-in attempt. After that, the root user can’t open the AWS Management Console until MFA is registered. What is a privileged account? shows where the root user sits among other admin accounts.
Tasks only the root user can do
AWS keeps a list of tasks that require the root user. Many are about the account itself and billing; the rest belong to specific services.
- Account settings. For a standalone account that isn’t part of AWS Organizations, changing the root email address, root password and root access keys, and closing the account. Reopening a standalone account you closed yourself also needs it.
- Recovery. If the only IAM admin accidentally removes their own permissions, the root user can sign in and restore them.
- Billing. Letting IAM users and roles into the Billing and Cost Management console, plus some other billing tasks and certain tax invoices.
- Specific services. Fixing an Amazon S3 bucket policy or SQS queue policy that locks everyone out, seller registration in the Reserved Instance Marketplace, and signing up for AWS GovCloud (US).
Other work doesn’t need the root user. If your team uses it for routine changes, you can move that work to personal sign-ins, as the next section describes.
Give everyday admins their own sign-in
For daily tasks, AWS recommends setting up an admin user in AWS IAM Identity Center. IAM Identity Center is AWS’s service for connecting your staff to AWS accounts and apps. You can connect your existing identity provider, such as Okta or Microsoft Entra ID, and sync users and groups from it. You can also create users directly in IAM Identity Center. If you use AWS Organizations to group several AWS accounts, permission sets let you define the rights for a job, such as admin, once. You then give that set to people and groups across your accounts.
AWS’s IAM best practices point the same way. People should sign in through an identity provider and get credentials that expire, rather than long-term passwords and keys. The list also asks you to require MFA, grant only the permissions a task needs, and regularly remove users, roles and permissions nobody uses. IAM users keep long-term passwords and access keys, so AWS recommends them only where expiring credentials won’t work. With personal sign-ins, AWS’s records show which person acted and with which rights.
Handling the root user when several people need it
Each AWS account has one root user, so every person who handles it uses the same login. AWS’s root user best practices say how to manage that.
- Share the root password, MFA and access keys only with people who have a strict business need. Log and monitor access to the password and where it’s stored. Consider making access to that storage need approval from at least two people.
- Don’t store the root password in a tool that depends on AWS services in the same account. If you lose the password, you lose the tool too.
- Where you can, give the password to one group of admins and the MFA to another. Signing in then takes one person from each group (AWS calls this multi-person approval).
- Use an email address that your business manages and that forwards to a group of people. AWS can then reach someone even when a person is on vacation, out sick, or gone. Don’t use that address for anything else.
- Don’t create root access keys. Those keys let scripts and command-line tools act as the root user.
- Register more than one MFA device, up to eight. If one is lost or damaged, you can sign in with another.
- Have one group manage the recovery email inbox and a different group manage the phone number. Both can reset the root password, so no one person should hold both.
If you group accounts with AWS Organizations, you can also remove root user credentials from member accounts centrally. Those member accounts then can’t sign in as the root user or recover its password, unless you allow password recovery. Once centralized root access is on, accounts you create inside Organizations start out with no root user credentials. The management account, or a delegated admin, can perform some root-only tasks on member accounts.
Recording who used the root user
AWS CloudTrail records actions by a user, a role or an AWS service as events, whether they came from the console, the command line or code. Its Event history lets you search and download the last 90 days of management events for each AWS Region, at no charge. To keep events longer, create a trail, which stores them in an Amazon S3 bucket. AWS also recommends alerts on every root sign-in and use. Have a procedure so whoever gets the alert can check whether the use was expected and escalate if not.
Everyone who uses the root user signs in with the same email address and password. So CloudTrail can show that the root user acted, but not which person it was. AWS’s advice to log access to where the password is kept fills that gap. That log, along with the approval record if you require two people, ties each use to a person. For other ways to run admin logins that stay shared, see Managing privileged accounts.
Frequently asked questions
Should the root user's email address belong to one employee?
AWS recommends a business-managed address that forwards to a group, so messages still reach someone when a person is away or has left. Use that address for nothing else.
Is one phone enough for root user MFA?
You can register up to eight MFA devices, and AWS strongly recommends more than one. If one device is lost or broken, another still works.
Can we create our admins as IAM users?
AWS recommends IAM Identity Center users who sign in with credentials that expire. IAM users keep long-term passwords and access keys, so keep them for cases where expiring credentials won't work.
Can we tell when the root user was used?
CloudTrail records root sign-ins and actions, and you can set alerts on them. It can't say which person signed in, so also log access to wherever the password is stored.
How Junify handles this
- Doing this by hand
- You decide who gets admin rights through requests and approvals, log every use of the admin logins that stay shared, and have someone other than the admins review that log on a schedule.
- With Junify
- Junify can hold a single login like the root user. Your admin adds the username and password to Junify, and people verify on their own phone before they use it, so each use is recorded by person. If the root user's MFA is an authenticator app, Junify enters that code too, so neither the password nor the code reaches the person. When someone moves off the team, the admin removes their assignment.
Sources
- AWS Identity and Access Management User Guide: AWS account root user
- AWS Identity and Access Management User Guide: Root user best practices for your AWS account
- AWS Identity and Access Management User Guide: Security best practices in IAM
- AWS IAM Identity Center User Guide: What is IAM Identity Center?
- AWS IAM Identity Center User Guide: IAM Identity Center identity source tutorials
- AWS CloudTrail User Guide: What Is AWS CloudTrail?
-
Ways to manage shared SaaS admin accounts, compared
A sign-out log, your identity provider's fill-in, a privileged access management (PAM) product, and an access tool such as Junify, compared on seven points.
-
Managing top-level admin accounts in Google Workspace and Microsoft 365
Keep few top-level admins, give everyone else a narrower role, require two-step verification for admins, and keep emergency accounts apart from daily ones.
-
Shared admin logins that remain when you use Okta or Microsoft Entra ID
Okta and Entra ID can fill in a shared admin login without showing the password. Gaps remain for people outside them, activity after sign-in, and console codes.