Sub topic 8
The few tasks that need root
This chapter assumes you have created an AWS account, enabled MFA on the root user, and understand why the root user should have no access keys. You should be comfortable with the AWS console and the AWS CLI. After this chapter you will be able to recognize which tasks need root credentials, plan for them, and use everything else through an administrative IAM identity.
Why the list is short
The root user is the identity created when you sign up. It cannot be restricted by IAM identity-based policies, and it owns the account. Because of that power, the guideline is to sign in as root only when AWS requires it. Everything else belongs to an IAM or IAM Identity Center identity with scoped permissions.
AWS documents a fixed list of tasks that only the root user can do. The list changes slowly, but it does change. Treat the AWS documentation page "Tasks that require root user credentials" as the authority and check it when you plan an account change. The categories below are stable.
The categories of root-only tasks
Account settings
- Change the account name, the root email address, or the root password.
- Change or remove the root user's MFA devices.
- View or change some account-level contact and payment settings.
- Close the account.
Closing an account is the most serious of these. After you close an account, AWS keeps it in a suspended state for a limited period (the post-closure period) during which you can reopen it. After that period, the account and its contents are permanently removed. Check the current length of that period before you rely on it.
Billing and tax settings
- Activate IAM user and role access to the Billing and Cost Management console. This setting is off by default. Until root turns it on, even an IAM identity with full administrator permissions cannot see billing pages.
- Change the account's tax registration or payment-related settings in some cases.
- Sign up for AWS GovCloud (US), which starts from a standard account.
The billing access setting matters most for this tutorial. You do it once, early, and the next chapter relies on it.
Support plan changes
- Change or cancel an AWS Support plan. An IAM identity cannot do this.
Resource-specific recovery tasks
These tasks exist because a resource is locked in a way that its own permissions cannot fix.
- Fix an Amazon S3 bucket policy that denies access to everyone, including administrators.
- Fix an Amazon SQS queue policy that denies access to everyone.
- Edit or delete an Amazon S3 bucket policy that denies all principals.
- Enable MFA delete on an S3 bucket in some configurations.
- Register as a seller in the Reserved Instance Marketplace.
Organization-level and credential tasks
- Restore IAM permissions when the only IAM administrator has removed their own access.
- Delete or manage some AWS Organizations settings that only the management account root can perform, such as closing member accounts in certain situations.
- Create or manage root user access keys. You should not do this, but the console only lets root do it.
You do not need to memorize the list. You need to know the pattern. Root-only tasks fall into three groups: settings that define the account itself, billing and support relationships with AWS, and recovery from situations where IAM permissions can no longer help.
A common mistake: confusing "needs admin" with "needs root"
When an action fails with AccessDenied, the cause is almost never that you need root. Check these causes first.
- The IAM identity lacks the permission. Add it, or use an identity that has it.
- A service control policy (SCP) in AWS Organizations blocks the action. Root in a member account is also limited by SCPs.
- A permissions boundary or session policy restricts the identity.
- A resource policy has an explicit deny.
- For billing pages, the "IAM user and role access to Billing information" setting is still off.
Reaching for root to bypass an error hides the real problem. It also trains a habit of using the most powerful credential for routine work.
Activating billing access as root
This is the one task you should expect to do right after setup.
- Sign in to the console as the root user, using your root email and MFA.
- Open the account menu in the top right and choose Account.
- Scroll to IAM user and role access to Billing information.
- Choose Edit, select Activate IAM Access, and choose Update.
- Sign out.
After this, an IAM identity with the right billing permissions can view and manage billing pages. Activating the setting does not grant permissions by itself. The identity still needs a policy that allows the billing actions. The administrative identity from the previous chapter, with an administrator policy, has them.
You can confirm which identity you are using at any time:
aws sts get-caller-identityThe Arn in the output ends in :root when you are root. For an administrator it shows an IAM user or an assumed role instead.
Planning for a root session
Because root sessions are rare, they are also easy to do badly. A short routine reduces mistakes.
- Decide the exact task before you sign in.
- Have the MFA device within reach. If the passkey or authenticator lives on a phone that is lost, you will be recovering the account, not doing the task.
- Use a private browser window, or a dedicated browser profile, so a saved session for another account does not interfere.
- Do the task, and nothing else.
- Sign out, and write down the date, the task, and the reason.
The record is useful later. When your CloudTrail logs show a root sign-in, you can match it to a known event instead of investigating a possible compromise.
Watching for unexpected root use
Root sign-ins should be rare, so any sign-in you did not plan is a signal. AWS CloudTrail records console sign-in events, including who signed in as root. Amazon EventBridge can match those events and send them to a notification target such as Amazon SNS. Many teams create a rule for root sign-in events so that a single email or message arrives each time.
The following pattern matches root console sign-ins. Save it as root-signin-pattern.json and use it in an EventBridge rule in the us-east-1 Region, where global sign-in events for the console are delivered by default.
{
"detail-type": ["AWS Console Sign In via CloudTrail"],
"detail": {
"userIdentity": {
"type": ["Root"]
}
}
}Console sign-in events for some endpoints appear in other Regions, so confirm where your sign-ins are recorded before you depend on a single rule.
Centralized root access in Organizations
If your account is a member of an AWS Organizations organization, the management account can enable centralized root access management. Member accounts can then have their root credentials removed. When a root-only task is needed on a member account, an administrator in the management account starts a short-lived privileged session scoped to that one task. The supported tasks include deleting a misconfigured S3 bucket policy, deleting a misconfigured SQS queue policy, and recovering root credentials in some cases.
This model is where the guideline of "almost never use root" ends up. Chapter 15 returns to Organizations. For a single standalone account, you still use the root user for these tasks.
Summary of the decision rule
| Situation | Use root? |
|---|---|
| Create an IAM user, role, or policy | No |
| Launch, stop, or delete resources | No |
| View billing after billing access is activated | No |
| Turn on IAM access to billing the first time | Yes |
| Change root email, password, or MFA | Yes |
| Change or cancel a Support plan | Yes |
| Close the account | Yes |
| Fix a bucket or queue policy that locks out everyone | Yes (or a central root session in Organizations) |
| An action returns `AccessDenied` | Not until you have ruled out the causes above |
Exercise
An administrator IAM user with the AdministratorAccess policy opens the Billing console and sees an access denied message. What is the most likely cause, who can fix it, and why is signing in as root to "just look at the bill" the wrong response?
Show answer
The account setting "IAM user and role access to Billing information" is still off, which is the default. Only the root user can turn it on, so a short root session is the correct fix: sign in as root with MFA, activate IAM access under Account, and sign out. Root should not be used to view the bill itself, because once the setting is on, the administrator can do that with a scoped, auditable identity. Using root for routine viewing makes root sign-ins common, which hides the unusual ones you want to notice.
Exercise
A teammate's S3 bucket policy accidentally denies s3:* to every principal. Their IAM administrator cannot edit it. Which credentials can fix this in a standalone account, and what should the teammate do afterward?
Show answer
The account's root user can delete or correct the bucket policy, because root can recover from a policy that denies all principals. Sign in as root with MFA, fix only that policy, and sign out. Afterward, record the change, review how the deny got written (for example by testing policies with IAM Access Analyzer or a staging bucket first), and confirm that no extra root activity occurred.