Sub topic 2
AWS Organizations: the management account, member accounts and the root
This chapter assumes you know what an AWS account is, can read IAM policy JSON, and can run AWS CLI commands. You will learn the three building blocks of AWS Organizations and create an organization from the CLI.
The working model
AWS Organizations is a service that groups AWS accounts so you can manage them as one unit. An organization has these parts:
- Management account: the account that creates the organization. It pays the bills for all members and can invite or create accounts, attach policies, and enable integrated services. Service control policies (SCPs) do not restrict it.
- Member accounts: every other account in the organization. Each keeps its own resources and IAM identities.
- Root: the top container of the hierarchy. It is not the root user of an account. Policies attached to the root apply to every member account below it.
Chapter 3 places accounts into organizational units (OUs) under the root. For now, every account sits directly under it.
Feature sets
An organization runs in one of two modes. With consolidated billing only, you get a single bill and nothing else. With all features, you also get SCPs, delegated administrators and integrated services. Choose all features, because it is the mode the rest of this tutorial depends on.
Create an organization
Run this from the account that should become the management account:
aws organizations create-organization --feature-set ALL
aws organizations list-rootsThe second command returns the root ID, which looks like r-examplerootid111. You need that ID when you create OUs or move accounts.
Organizations also creates an administrative role, OrganizationAccountAccessRole, in each account it creates. Chapter 9 covers how to assume it.
Common errors
- Using the management account for workloads. SCPs cannot restrict it, so any workload there is outside your guardrails. Keep it for organization administration and billing only.
- Confusing the root with the root user. The root user is the sign-in identity of a single account. The organization root is a container.
- Using a personal email address for the management account. Use a shared mailbox that your team controls, because that email is the recovery path for the account.
- Skipping MFA on the management account's root user. A compromised management account puts every member at risk.
What you can and cannot do
| Task | Where it runs |
|---|---|
| Create or invite accounts | Management account |
| Attach SCPs | Management account or a delegated administrator |
| Run workloads | Member accounts |
| Receive the consolidated bill | Management account |
Exercise
Why should you avoid running workloads in the management account?
Show answer
SCPs do not apply to the management account, so workloads there are not covered by your guardrails. A compromise there also exposes the whole organization. Run workloads in member accounts instead.