Sub topic 1
What an AWS account is
An AWS account is the container that holds everything you build on AWS. It is also the unit that AWS uses to bill you and to enforce security. Later chapters cover signing up, protecting the root user, and setting budgets. Each of those depends on the model in this chapter.
Prerequisites
This chapter assumes you already have:
- Basic familiarity with cloud computing ideas such as virtual servers, storage, and pay-as-you-go pricing.
- Comfort with a web browser and a command line.
- Optionally, the AWS CLI installed. You need it only for the check near the end, and you can read along without it.
You do not need an AWS account yet. The next chapter walks through creating one.
The account as a boundary
When you create an AWS account, you get an isolated space. Resources created inside it, such as virtual machines, storage buckets, databases, and permissions, belong to that account. By default, nothing outside the account can see or change them.
This isolation works in two ways.
- Security boundary. Permissions are evaluated inside an account. A user in account A has no access to account B unless someone in B explicitly grants it.
- Billing boundary. Every charge is attributed to one account. Usage in your account appears on your invoice. Usage in another account does not.
An account is not a person, and it is not a login. It is a container. People and programs get access to it through identities.
Account identifiers
Every account has a 12-digit account ID, such as 111122223333. You will see it in resource identifiers, in sign-in URLs, and in cross-account permissions. The account ID is an identifier, not a secret. It is not a password. Still, avoid posting it needlessly, because it helps an attacker target you.
An account also has an account name (a label you choose) and a root email address. The email address is tied to the root user, which the next section explains.
Two kinds of identity
Inside an account, there are two broad categories of identity.
| Identity type | Created by | Power | Intended use |
|---|---|---|---|
| Root user | Automatically, at sign-up | Unrestricted within the account | A few rare tasks only |
| IAM identities (users, roles) and IAM Identity Center users | You, after sign-up | Only what policies grant | Daily work |
IAM (Identity and Access Management) is the AWS service that controls who can do what. An IAM policy is a JSON document that allows or denies actions on resources. Identities start with no permissions. You add them by attaching policies.
The root user is different. It exists from the moment the account is created, and you sign in as root with the email address and password you used at sign-up. Policies cannot restrict it in the ordinary way. It can close the account, change the payment method, and change anything else in it. Because of that power, the safe pattern is to protect the root user heavily, then stop using it for routine work. The chapters that follow cover how.
How the pieces fit together
The diagram shows what lives inside one account and what sits outside it.
Two details are worth noticing. The root user reaches resources without needing a policy to grant access. IAM identities reach resources only through policies. And the bill is collected per account, which is why cost control starts with the account itself.
Regions and global services
An account is not tied to one geographic location. AWS runs in many Regions, which are separate geographic areas such as us-east-1 (N. Virginia) or eu-west-1 (Ireland). Most resources you create live in one Region of your choice. Your account spans all of them.
Some things are global within the account. IAM users, roles, and policies exist once per account, and you see them from any Region. Billing data is also account-wide.
This difference causes a common mistake. You create a server, switch the console to a different Region, and the server seems to have vanished. It has not. The console shows one Region at a time, and the server is still running (and billing) in the Region where you made it.
Identity and access: which entry point?
AWS gives you several ways to reach an account. Knowing the names now prevents confusion later.
- Root user sign-in. Email address plus password, then MFA if you have enabled it. This is the only login that exists automatically.
- IAM user. A long-lived identity you create inside the account, with its own name and password, and optionally access keys for programmatic use.
- IAM role. An identity with no long-term password. A person or service temporarily assumes the role and receives short-lived credentials.
- IAM Identity Center user. A workforce identity managed in a central directory. Users sign in to a portal and receive short-lived credentials for the accounts and roles assigned to them.
The tutorial's later chapters set up a separate administrative identity for daily work, so you rarely touch the first entry point.
Checking which identity you are using
You can ask AWS who it thinks you are. Run this from any terminal with the AWS CLI configured:
aws sts get-caller-identityThe output is a small JSON document. For an IAM user it looks like this:
{
"UserId": "AIDAEXAMPLEUSERID",
"Account": "111122223333",
"Arn": "arn:aws:iam::111122223333:user/alice"
}Read the Arn field. An ARN (Amazon Resource Name) is the unique name AWS gives every resource and identity. Here is how to interpret it:
arn:aws:iam::111122223333:user/aliceis an IAM user named alice in account 111122223333.arn:aws:sts::111122223333:assumed-role/Admin/aliceis a temporary session from a role, and is what you normally see with Identity Center.arn:aws:iam::111122223333:rootmeans the credentials belong to the root user. If you see this while doing ordinary work, stop and switch to a different identity.
Common errors and misconceptions
- "My account is my login." The account is the container. The root user and IAM identities are the logins.
- "One account is enough forever." One account works for learning. Larger setups use several accounts, one per environment or team, because the account is the strongest isolation boundary AWS offers. The final chapter of this tutorial points to AWS Organizations for that.
- "The root user is just a bigger admin." An administrator is still limited by policies and can be restricted. Root cannot be restricted the same way, and a few tasks work only as root.
- "Deleting resources closes the account." It does not. An account stays open, and may still carry charges for items such as support plans, until you close it deliberately.
- "Account IDs are secret." They are not credentials. Passwords, access keys, and session tokens are.
- "Free tier means I cannot be charged." Free tier allowances are limited by service, amount, and time. Usage beyond them is billed. That is why the chapter on budgets matters.
What this means for the rest of the tutorial
The account model sets the order of the next steps. You create the account, which creates the root user. You protect that root user with a careful email setup, multi-factor authentication, and no access keys. You create an everyday identity with limited permissions. You then watch the billing boundary with a budget. Each step protects a different part of the picture above.
Exercise
You run aws sts get-caller-identity and the Arn is arn:aws:iam::111122223333:root. What does that tell you, and what should you do?
Show answer
The CLI credentials belong to the root user of account 111122223333, which has unrestricted power and should not be used for routine work. Stop, remove or replace those credentials, and use a separate administrative IAM or Identity Center identity instead. Root should have no access keys at all, so also check whether root access keys exist and delete them.
Exercise
You create an EC2 server in the eu-west-1 Region, then open the console while it is set to us-east-1 and see no servers. Is the server gone? Which parts of the account are the same in every Region?
Show answer
The server is not gone. The console shows one Region at a time, and the server still exists, and bills, in eu-west-1. Switch the console to that Region to see it. IAM users, roles, policies, and the account's billing data are account-wide and look the same from any Region.