Sub topic 2
AWS Organizations: the management account, member accounts and the root
This chapter covers the three building blocks of every organization: the management account, the member accounts and the root. It assumes you know the AWS CLI, IAM roles and JSON policies, and the reasons for splitting workloads across accounts from the previous chapter.
What an organization is
AWS Organizations is a free service that groups AWS accounts into one managed unit called an organization. The organization gives you three things:
- A single place to create, invite and close accounts.
- A hierarchy that policies attach to.
- A single bill that covers every account.
An organization has exactly one management account, zero or more member accounts, and one root. The term "root" is easy to confuse with two other things:
| Term | Meaning |
|---|---|
| Organization root | The top node of the account hierarchy. Policies attached here apply to everything below. |
| Account root user | The email-and-password identity that owns a single AWS account. |
| Root ID | The identifier of the organization root, in the form `r-xxxx`. |
This chapter uses "root" only for the hierarchy node. The identity is always "the root user".
The management account
The management account is the account that called create-organization. It cannot be swapped for another account later. To change it, you would have to remove every member, delete the organization and build a new one. Choose it deliberately.
The management account can:
- Create, invite, move and remove member accounts.
- Create and attach policies.
- Enable trusted access for AWS services.
- Pay the bill for every account.
It has one unusual property: service control policies (SCPs) never restrict it. A guardrail attached to the root or to any OU does not reach the management account. Anyone with permissions there can act outside your guardrails, so your protection is a small attack surface, not a policy.
Three practices follow from this:
- Run no workloads in the management account. No EC2 instances, no application buckets, no databases.
- Protect its root user with MFA, and keep the root user's credentials out of daily use.
- Give few people access to it, and delegate day-to-day administration of security and other services to member accounts (covered in a later chapter).
Member accounts
A member account is any other account in the organization. Each one keeps its own IAM users and roles, its own resources and its own service quotas. What changes is that the management account can apply policies to it and receives its bill.
An account belongs to one organization at a time. You get a member account in one of two ways:
- Create it from inside the organization. Organizations builds the account and, by default, adds an IAM role named
OrganizationAccountAccessRolethat the management account can assume. - Invite an existing standalone account. It accepts the invitation and joins. Because it was not created by Organizations, it has no such role unless you add it yourself.
Account creation is covered fully in a later chapter. Here you only need to know that both paths produce an ordinary account with a 12-digit ID.
The root
The root is the container at the top of the hierarchy. Accounts and organizational units (OUs) sit under it, and OUs can nest further. An organization has exactly one root, and it appears as the parent of anything you have not placed deeper.
Notice that the management account administers the organization but is not a child of any OU. It sits at the root level and is exempt from SCPs.
Identifiers you will see
Each object type has a recognizable ID format. Spotting them helps when you read CLI output or policy conditions.
| Object | Format | Example |
|---|---|---|
| Organization | `o-` plus lowercase letters and digits | `o-a1b2c3d4e5` |
| Root | `r-` plus 4 to 32 characters | `r-examplerootid111` |
| OU | `ou-` plus root ID suffix, a dash, and 8 characters | `ou-examplerootid111-exampleouid111` |
| Account | 12 digits | `111122223333` |
| Policy | `p-` plus characters | `p-examplepolicyid111` |
Feature sets: why to choose all features
When you create an organization you choose a feature set:
ALLenables consolidated billing plus the management features: SCPs and other policy types, trusted access for AWS services, and delegated administrators.CONSOLIDATED_BILLINGenables only the shared bill.
Choose ALL. An organization created with only consolidated billing can be upgraded later, but every member account must approve the change. For a large fleet that is a coordination problem you can avoid on day one. The rest of this tutorial assumes ALL.
Create an organization from the CLI
Run these commands with credentials for the account you have chosen as the management account.
aws organizations create-organization --feature-set ALL
aws organizations describe-organization
aws organizations list-rootscreate-organization makes the calling account the management account. describe-organization returns the organization ID, the management account ID and email, and the feature set. list-roots returns the root ID, which you need as a parent ID for later commands. The output also shows which policy types are enabled on the root. In a new organization with all features, the managed SCP FullAWSAccess is attached to the root, so nothing is blocked until you add a deny.
Now add an OU and a member account, then move the account into the OU:
aws organizations create-organizational-unit \
--parent-id r-examplerootid111 \
--name Workloads
aws organizations create-account \
--email [email protected] \
--account-name prod-app1
aws organizations move-account \
--account-id 111122223333 \
--source-parent-id r-examplerootid111 \
--destination-parent-id ou-examplerootid111-exampleouid111create-account is asynchronous. It returns a request ID right away, and the account does not exist until the request succeeds. Poll it with aws organizations describe-create-account-status --create-account-request-id <id>. The new account's ID appears in the result, and that is the ID you pass to move-account.
Reaching a member account
The management account does not log in to a member account directly. It assumes a role instead. For accounts created by Organizations, that role is OrganizationAccountAccessRole:
aws sts assume-role \
--role-arn arn:aws:iam::111122223333:role/OrganizationAccountAccessRole \
--role-session-name admin-sessionThe call returns temporary credentials. This role has administrator permissions by default, so treat it as a break-glass path. Later chapters replace routine use of it with IAM Identity Center.
Declaring the same structure in Terraform
The same structure can live in version control. This Terraform configuration declares the organization, an OU and a member account:
resource "aws_organizations_organization" "org" {
feature_set = "ALL"
aws_service_access_principals = [
"cloudtrail.amazonaws.com",
"sso.amazonaws.com",
]
enabled_policy_types = ["SERVICE_CONTROL_POLICY"]
}
resource "aws_organizations_organizational_unit" "workloads" {
name = "Workloads"
parent_id = aws_organizations_organization.org.roots[0].id
}
resource "aws_organizations_account" "prod_app1" {
name = "prod-app1"
email = "[email protected]"
parent_id = aws_organizations_organizational_unit.workloads.id
role_name = "OrganizationAccountAccessRole"
}Two details matter here. roots[0].id reads the root ID from the organization, so you never hard-code it. The aws_service_access_principals list is the trusted-access setting, which lets named AWS services work across all accounts.
Common errors and gotchas
- Email already in use. Every account needs an email address that is unique across all of AWS. Plus-addressing (
[email protected]) or a mail alias per account avoids collisions. - Account quota reached. New organizations start with a default limit on the number of accounts. Request an increase before a bulk rollout, not during it.
- Deleting an organization. You must remove every member account first. Accounts created through Organizations need extra setup (such as a payment method and contact details) before they can leave and run standalone.
- Closing versus removing. Removing an account takes it out of the organization. Closing it starts account closure. They are different operations.
- Assuming SCPs protect the management account. They do not. Do not rely on one to restrict it.
- Letting the structure drift. Accounts created by hand in the console are valid, but they are easy to forget. Prefer one creation path, such as Terraform.
Summary of responsibilities
| Component | Role | Subject to SCPs |
|---|---|---|
| Management account | Creates accounts, attaches policies, pays the bill | No |
| Member account | Runs workloads, receives guardrails | Yes |
| Root | Top of the hierarchy, carries policies inherited by all | Applies to members below it |
Exercise
A teammate attaches an SCP at the root that denies all actions in the ap-southeast-1 Region. Does it stop someone in the management account from launching an EC2 instance there? Why or why not?
Show answer
No. SCPs never restrict the management account, even when attached at the root. They apply only to member accounts. If the instance must be blocked, use another control in the management account, such as IAM policies, or avoid giving anyone permissions there.
Exercise
You run aws organizations create-account and immediately call move-account with the account ID you expect. The call fails. What is the most likely cause, and how do you fix it?
Show answer
Account creation is asynchronous, so the account may not exist yet. Call describe-create-account-status with the request ID until the state is SUCCEEDED, read the account ID from the result, and then run move-account.