Sub topic 8
The few tasks that need root
This chapter assumes you have created an account, know that the root user has unrestricted power, and have enabled MFA on it. It also assumes you are comfortable running AWS CLI commands. Here you learn which tasks truly require root, so you can use root rarely and on purpose.
Why the list is short
Almost every AWS action can be done by an IAM identity with the right permissions. A small set of account-level actions cannot, because they sit above IAM. If you lock yourself out of IAM, or you change who owns the account, no IAM policy can help you. Those actions are tied to the root user.
Common root-only tasks
AWS maintains the full list in its documentation, and it changes over time, so check it before you rely on a specific item. The tasks you are most likely to meet are:
- Change account settings: the account name, the root email address, the root password, or the root access keys.
- Restore IAM permissions, for example when the only administrator removed their own access.
- Close the AWS account.
- Change or cancel an AWS Support plan.
- Activate IAM access to the Billing console, so that non-root identities can see cost data.
- Enable MFA delete on an S3 bucket.
- Fix an S3 bucket policy or an SQS queue policy that denies access to everyone, including administrators.
Tasks like these come up a few times a year at most. Everything else belongs to your administrative identity.
A habit for root sessions
Treat each root sign-in as a short, planned visit.
- Decide the exact task before you sign in.
- Sign in with the root email and your MFA device.
- Do only that task.
- Sign out.
You can confirm which identity your CLI session uses with a command from earlier in this tutorial:
aws sts get-caller-identityIf the Arn in the output ends in :root, your CLI is running as the root user. That means root access keys exist and are in use, which the previous chapter told you to avoid. The expected result is an ARN that names an IAM user or an assumed role.
Common mistakes
- Using root because it is faster. Root skips every permission check. If a task fails under your admin identity, add the missing permission rather than switching to root.
- Keeping root credentials where daily tools can reach them. The root password and MFA device should be stored apart from your everyday tools and sign-in flow.
- Forgetting the billing step. IAM identities cannot see billing pages until root activates IAM access to the Billing console. This is one of the few reasons to sign in as root early in the life of an account. The next chapters build on it.
Check your understanding
Exercise
Your administrator user can no longer manage IAM because a policy change removed its own permissions. Which identity can fix this, and why can't another IAM policy fix it?
Show answer
The root user can restore IAM permissions. Restoring them is a root-only task, because IAM policies cannot grant access once every IAM identity has lost it. Sign in as root with MFA, repair the permissions, then sign out.
Exercise
You run aws sts get-caller-identity and the Arn ends in ":root". What does this tell you, and what should you do?
Show answer
The CLI is authenticating as the root user, which means root access keys exist and are in use. Switch the CLI to your administrative identity, then delete the root access keys.