1.3 AWS Accounts, Organizations, and the Management Account
Right, let’s talk about the thing you just signed up for: your AWS account. It feels a little like getting a set of keys to a vast, empty, and slightly expensive warehouse. It’s just you in there, and you can do anything. This is both the best and worst thing about it. The power is intoxicating, the potential for catastrophic billing is very real. So before you start launching a hundred c7g.metal instances to see how fast they can mine Bitcoin (don’t), we need to talk about structure. Because no one stays a solo act for long, and AWS knows it.
The moment you create that first account, you’ve also, whether you asked for it or not, created a Management Account. This isn’t just a fancy title. It’s the godfather of your AWS universe. It has ultimate power, and with that power comes ultimate responsibility (and billing). This account can never leave the family. It’s the one that pays the bill for every single other account you create under it. Think of it as the corporate credit card holder for your entire operation.
The Management Account: Your New Overlord
This account is special, and you should treat it like one. It has unique privileges, like the ability to manage consolidated billing, create and invite other accounts, and establish policies that govern every other account in your little empire. The cardinal rule, beaten into every seasoned AWS architect, is this: you do not run your actual workloads in the Management Account. This account is for managing your organization and paying the bill, period. Why? Because if this account gets compromised, the attacker doesn’t just get access to one application; they get the keys to the entire kingdom. They can create new accounts, disable security policies, and run up a truly spectacular bill on your dime. So, the first thing you do after reading this is go make a new account for your actual work. I’ll wait.
AWS Organizations: The Bureaucracy You’ll Learn to Love
So how do you manage this multi-account chaos without losing your mind? You use AWS Organizations. This is the service that formally groups your accounts together into, you guessed it, an organization. It’s the framework that makes everything else possible. Once you enable Organizations, your Management Account can start inviting existing accounts or creating new ones (called Member Accounts).
The real magic of Organizations isn’t just grouping accounts; it’s Service Control Policies (SCPs). These are IAM policies that you attach to an entire Organizational Unit (OU) or even the whole organization. They act as a guardrail, defining the maximum permissions for every user and role in every account within that OU. Even if an IAM policy inside a member account says “yes, you can do anything,” if the SCP says “no, you can’t do that thing,” the answer is no. SCPs are the ultimate veto power from your Management Account.
Here’s a quick example. Let’s say you have an OU for Sandbox accounts where your developers can experiment. You might want to prevent them from accidentally creating resources in an expensive region. You’d attach an SCP like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyAllOutsideUS",
"Effect": "Deny",
"NotAction": [
"a4b:*",
"acm:*",
"aws-portal:*",
... // (you'd list other global services here)
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"us-east-1",
"us-west-2"
]
}
}
}
]
}
This SCP denies all actions (except for a few global ones like IAM and AWS Support) if they aren’t requested in us-east-1 or us-west-2. It’s a brutal but effective way to prevent budget surprises from a Tokyo-based mistake.
Organizational Units (OUs): Your Folder Structure for Accounts
You wouldn’t dump all your files in one folder on your laptop, so don’t dump all your AWS accounts into one flat list. OUs let you create a hierarchy. A typical structure might look like:
- Root
- Security (
ou-abc1-abcdefg) // For your security-tooling accounts - Workloads (
ou-abc2-1234567) // For your actual applications- Production (
ou-abc3-prod123) - Staging (
ou-abc3-stag456)
- Production (
- Sandbox (
ou-abc4-sandbox1) // For uncontrolled, terrifying experiments
- Security (
This structure isn’t just for looks. You attach SCPs to these OUs to apply broad governance. Maybe your Sandbox OU has a very restrictive SCP, while your Production OU has one that’s slightly more open but still denies dangerous actions like closing an account or disabling CloudTrail.
The Invitation Process: Bringing Accounts into the Fold
If you have an existing AWS account that you want to bring into your organization, you don’t “create” it from the Management Account. You invite it. The process is straightforward but has one “gotcha” that’s tripped up more people than I can count.
From your Management Account, you generate an invitation. You can do this in the AWS CLI:
# Generate the invitation from the Management Account
aws organizations invite-account-to-organization \
--target Type=EMAIL,Id=developer@mycompany.com \
--notes "Welcome to the party, please check your email."
This sends an email to the owner of the account you want to invite. Now, here’s the pitfall: that owner must accept the invitation while logged into the account they are inviting. They cannot be logged into any other account, especially not the Management Account. It seems obvious, but in the heat of the moment, it’s a classic facepalm moment. Once accepted, control of the account is effectively ceded to the Organization’s SCPs. The invited account’s root user can still do things, but only within the boundaries you’ve set.