AWS accounts and Organizations
Use AWS accounts as security, billing and quota boundaries, organise them with AWS Organizations and OUs, and choose the right organisation policy for a bank's guardrails.
Assumes: .NET 10 LTS ยท AWS SDK for .NET v4 (AWSSDK.Organizations 4.1.x) ยท AWS CLI v2 ยท Terraform AWS provider v6 ยท Region us-east-1. Verified against official sources on 2026-11-17.
Learning objectives
By the end of this lesson you can:
- Explain why an AWS account is a hard boundary for security, billing, quotas and blast radius, and what an account ID is (and is not).
- Describe the parts of AWS Organizations: the management account, member accounts, the root, organisational units (OUs), consolidated billing and delegated administrators.
- Choose between SCPs, RCPs, tag policies, backup policies and other declarative policies for a given guardrail.
- Sketch a multi-account OU layout for Harbourline Bank and justify each OU.
- Explain cross-account access with IAM roles and why it beats sharing credentials.
- Produce evidence from the CLI that your Module 0 set-up is correct (Lab 1.1).
Prerequisites
- Secure your AWS account โ you created an Organization, a Sandbox OU, a sandbox account and a Region SCP there. This lesson explains the why and goes wider; it does not repeat the set-up.
- Cost guardrails โ the budgets you check in the guided exercise.
- AWS global infrastructure
- Tools: AWS CLI v2 with the
learn-managementandlearn-sandboxSSO profiles
Why this matters in banking
Imagine Harbourline Bank ran everything โ the payments platform, the data lake, developer experiments and the security logs โ in one AWS account. Then:
- A developer testing a script with broad permissions deletes a production DynamoDB table, because "admin" in that account means admin over everything.
- An attacker who phishes one engineer's session can read card-tokenisation data and delete the CloudTrail logs that would have shown the attack.
- Finance cannot say what the Payments Service costs, because its resources are mixed with everyone else's.
- A load test hits the account's Lambda concurrency quota and production payments start being throttled.
Every one of these failures is prevented by putting workloads in separate accounts and governing them centrally. Regulators and auditors expect segregation of environments and duties and protected audit logs; in AWS, the account boundary is the primary tool for both. Banks routinely run hundreds of accounts.
The idea in plain language
An AWS account is a container for resources, identities and a bill. Nothing in one account can touch another account unless someone in the target account explicitly allows it. That makes an account the cleanest wall AWS offers.
AWS Organizations is a free service that groups accounts:
- The account that creates the organisation becomes the management account. It pays the bill for everyone and controls the structure. It should run no workloads.
- Every other account is a member account.
- Accounts hang off a single root and can be placed in organisational units (OUs) โ folders that can nest up to five levels deep.
- Policies attached to the root, an OU or an account apply to everything below it. Some policies limit permissions (SCPs and RCPs); others set standard configuration (tag, backup and other declarative policies).
Analogy: Harbourline Bank's group structure. Each AWS account is a separate legal subsidiary with its own safe, staff and ledger โ one subsidiary's manager has no keys to another's safe. AWS Organizations is the group holding company. The management account is group head office: it pays the bills and writes group policy but does not serve customers. OUs are divisions (Retail, Security, Group IT), and an SCP is a group rule such as "no division may open branches outside the UK and Ireland" that even a division's own managing director cannot overrule.
What problem the AWS service solves
What an account gives you
| Boundary | What it means | Why a bank cares |
|---|---|---|
| Security | IAM principals in account A have no access to account B unless B's policies allow it | Production data is unreachable from development by default |
| Blast radius | A mistake, compromise or runaway script is contained to one account | Incidents stay small; recovery is scoped |
| Billing | Every charge is attributed to an account | Cost per system or team without perfect tagging |
| Quotas | Most service quotas (for example concurrent Lambda executions, which default to 1,000 per Region) are per account per Region | A test cannot starve production of capacity |
| Governance | Policies can differ per account and OU | Strict guardrails in production, room to experiment in sandboxes |
The account ID is a 12-digit number such as 111122223333. It appears in every ARN (arn:aws:iam::111122223333:role/...). AWS documents that account IDs are not secret credentials, but treat them like internal infrastructure details: do not publish them needlessly, and never rely on secrecy of an ID for security. An account alias gives a friendlier IAM sign-in URL; with Identity Center you rarely need one.
The root user of each account is covered in Secure your AWS account. The key multi-account fact: with centralised root access, member accounts created through Organizations can have no root credentials at all.
What Organizations adds
| Feature | What it does |
|---|---|
| Consolidated billing | One bill and one payment method for all accounts. Usage is aggregated for volume pricing tiers, and Reserved Instance and Savings Plans discounts can be shared across accounts (sharing can be turned off) |
| Account creation API | Create member accounts programmatically, each with an OrganizationAccountAccessRole that the management account can assume |
| OUs | Group accounts by function and risk; policies inherit downwards |
| Organisation policies | Guardrails and standard settings across many accounts (table below) |
| Trusted access and delegated administrators | Let services such as IAM Identity Center, CloudTrail, GuardDuty or Security Hub work across the whole organisation, and hand their administration to a member account (for example the Security Tooling account) so people do not need to work in the management account |
Organisation policy types (checked 2026-11-17)
Organizations groups policy types into authorization policies and declarative (management) policies. Policies require the organisation to have all features enabled.
| Policy type | Category | What it does | Affects management account? | Typical Harbourline use |
|---|---|---|---|---|
| Service control policy (SCP) | Authorization | Caps the maximum permissions of IAM users and roles in member accounts. Never grants anything | No | Deny Regions other than eu-west-2/eu-west-1; deny disabling CloudTrail or GuardDuty; deny leaving the organisation |
| Resource control policy (RCP) | Authorization | Caps the maximum permissions on resources (S3, KMS, SQS, Secrets Manager, STS and many more) โ including for callers from outside the organisation | No | Data perimeter: "no principal outside our organisation can read our S3 buckets or use our KMS keys", even if a bucket policy is misconfigured |
| Tag policy | Declarative | Standardises tag keys (capitalisation) and allowed values; can enforce them on chosen resource types | Yes | Environment must be one of prod, nonprod, sandbox |
| Backup policy | Declarative | Applies AWS Backup plans across accounts | Yes | Daily encrypted backups of all resources tagged Backup=daily |
| Amazon EC2 policies (declarative policies for EC2) | Declarative | Enforce EC2 settings such as blocking public AMI sharing or requiring IMDSv2, and keep them enforced as features change | Yes | Require IMDSv2 on every instance |
| AI services opt-out policy | Declarative | Controls whether AWS AI services may use your content to improve services | Yes | Opt out organisation-wide |
| Others | Declarative | Chat applications, Security Hub, Amazon Inspector, Amazon Bedrock, Amazon S3, Amazon GuardDuty and upgrade-rollout policies | Yes | Centrally enable security services; Module 15 |
Two rules worth memorising:
- SCPs and RCPs never grant permissions โ they only set a ceiling. Effective permission is the intersection of what the SCP/RCP allows and what IAM or resource policies grant. An explicit deny anywhere wins.
- SCPs and RCPs do not apply to the management account (and do not restrict service-linked roles). That is why no workload belongs in the management account.
Limits and sharp edges
- Default quota of 10 accounts per organisation (adjustable through Service Quotas from the management account; new organisations may start lower). Plan ahead if you script account creation.
- OUs nest at most five levels deep; one root per organisation.
- SCP size limit 10,240 characters; RCP 5,120. Up to 10 SCPs and 5 RCPs attached directly to each root, OU or account (
RCPFullAWSAccesscounts as one of the five). - Up to five member-account creations can be in progress at once; creation is asynchronous.
- Closing accounts has its own quotas, and a closed account sits in a 90-day post-closure period before permanent closure; it still counts against the account quota until then.
- Creating an Organization upgrades a Free plan account to the Paid plan (see Free Tier and billing).
- Cost allocation tags can only be activated from the management account (or a standalone account), and tags only apply to cost data from when they were added.
AWS Control Tower and landing zones
A landing zone is a pre-built, well-governed multi-account environment. AWS Control Tower builds and maintains one for you on top of Organizations, IAM Identity Center and Service Catalog: it creates shared Log Archive and Audit accounts, applies preventive, detective and proactive controls, and provides an Account Factory for vending new accounts. Control Tower configures other services such as AWS Config and CloudTrail that are billed separately โ VERIFY current Control Tower pricing before enabling it. In this course you build a hand-made mini landing zone (Module 0) so you understand each piece; Module 15 compares it with Control Tower.
Microsoft / Azure comparison
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
| Azure subscription | AWS account | An AWS account holds its own identities (IAM roles) and is a stronger isolation boundary; cross-account access must be explicitly trusted |
| Entra ID tenant | IAM Identity Center + the Organization | Users live in Identity Center (or your IdP), not in each account |
| Management groups (up to six levels) | Root + OUs (up to five levels) | Policies attach to OUs and inherit; an account belongs to exactly one OU |
| Azure Policy (deny, audit, modify) | SCPs/RCPs (deny guardrails) + declarative policies (standard config) + AWS Config (detective, Module 15) | SCPs act on API permissions, not on resource properties after the fact |
| Azure Lighthouse / guest users across tenants | Cross-account IAM roles (sts:AssumeRole) | The target account's role trust policy decides who may enter |
| Enterprise Agreement / billing account | Management account with consolidated billing | Discounts and volume tiers pool across member accounts |
| Azure Landing Zone accelerator | AWS Control Tower / Landing Zone Accelerator on AWS | Both build an opinionated multi-account baseline |
| Resource tags + Azure Policy "require tag" | Tags + tag policies + SCP conditions on aws:RequestTag | Tag policies standardise values; requiring a tag at creation needs an SCP or IaC checks |
| Azure Cost Management scopes | Cost Explorer by linked account, cost allocation tags, cost categories | Tags must be activated for billing before they appear in cost reports |
Architecture
Harbourline Bank's target organisation (fictional IDs), following the OU patterns from the AWS multi-account whitepaper:
Why each OU exists:
- Security โ accounts that watch everyone else. The log archive is write-only for workloads and read-only for auditors; nobody from Workloads can delete it.
- Infrastructure โ shared networking and platform services, owned by a platform team.
- Workloads/Prod and Workloads/NonProd โ one account per system per environment. Prod gets the strictest SCPs (for example, deny changes outside the deployment role).
- Sandbox โ personal experimentation with spending caps and a Region guardrail; no connectivity to production. Your
cea-sandboxis one of these. - Policy Staging โ test new SCPs here before attaching them to Prod (AWS strongly recommends testing SCPs and RCPs before attaching them broadly).
- Suspended โ accounts being decommissioned or quarantined after an incident. A deny-all SCP freezes them while evidence is kept.
Security-boundary view of cross-account access:
Step-by-step implementation
This lesson's hands-on part is Lab 1.1: confirm your Module 0 set-up with evidence. You change nothing โ you collect proof, as an auditor would.
Sign in to both profiles
aws sso login --profile learn-management
aws sso login --profile learn-sandboxIf both profiles share one sso-session, the second login reuses the first token.
Prove who you are in each account
Run aws sts get-caller-identity for both profiles (see AWS CLI). The ARNs should be assumed-role ARNs containing AWSReservedSSO_ManagementAdmin_โฆ (or BillingViewer) and AWSReservedSSO_SandboxAdmin_โฆ, ending in your Identity Center user name. That proves you are using Identity Center, not IAM users or root.
Prove the root user is locked down
Run aws iam get-account-summary in the management account. AccountMFAEnabled must be 1 (root has MFA) and AccountAccessKeysPresent must be 0 (no root access keys). Then run aws iam list-organizations-features: it should list RootCredentialsManagement and RootSessions if you centralised root access in Module 0. In the sandbox account, AccountMFAEnabled may be 0 โ that is expected when the member account has no root credentials at all.
Prove the organisation structure
From the management profile, run describe-organization (expect "FeatureSet": "ALL"), list the root's children, and list the accounts in the Sandbox OU. Then run the C# tree printer in Complete code for a one-screen picture.
Prove the guardrails
List the SCPs attached to the Sandbox OU โ cea-region-guardrail must be there alongside FullAWSAccess. Then repeat the allowed/denied Region test from Module 0 with the sandbox profile.
Prove the budgets and that email reaches you
List the budgets in the management account; expect cea-zero-spend and cea-monthly-5usd. Check their notification subscribers. Finally, search your inbox for the AWS Budgets / SNS confirmation emails from Module 0. An alert nobody receives is not a control. If you never got an email, fix the subscriber now.
Write the evidence pack
Save the outputs (with account IDs masked to the last four digits) into docs/lab-1-1-evidence.md in your learning journal, with the date. This is exactly the kind of artefact an internal auditor asks for.
AWS Console instructions
- Organisation tree: AWS Organizations โ AWS accounts. Switch between the hierarchy and list views; select an OU to see attached policies on the Policies tab.
- Policies: AWS Organizations โ Policies โ choose the policy type (Service control policies, Resource control policies, Tag policies, Backup policies, โฆ). Each type must be enabled before first use.
- Delegated administrators: AWS Organizations โ Services โ choose a service โ Register delegated administrator (or from the service's own console, for example GuardDuty โ Settings).
- Root access management: IAM โ Root access management in the management account.
- Cost allocation tags: Billing and Cost Management โ Cost allocation tags (management account only) โ select keys such as
Project,Lab,Environment,Ownerโ Activate. Keys can take up to 24 hours to appear and up to another 24 hours to activate. - Service quotas: Service Quotas โ AWS services โ choose a service to see the applied quota for this account in this Region.
AWS CLI
Fictional IDs are used; substitute your own. PowerShell syntax.
# --- Identity evidence -------------------------------------------------------
# Management account: should show an assumed-role ARN for an AWSReservedSSO_ role.
aws sts get-caller-identity --profile learn-management
# Sandbox account: same pattern, different account ID.
aws sts get-caller-identity --profile learn-sandbox
# --- Root user evidence (management account) ---------------------------------
# AccountMFAEnabled = 1 and AccountAccessKeysPresent = 0 are what you want.
aws iam get-account-summary `
--query "SummaryMap.{RootMfa:AccountMFAEnabled,RootAccessKeys:AccountAccessKeysPresent,Users:Users}" `
--profile learn-management
# Centralised root access for member accounts (expects RootCredentialsManagement, RootSessions).
aws iam list-organizations-features --profile learn-management
# --- Organisation structure ---------------------------------------------------
# FeatureSet must be ALL for SCPs, RCPs and declarative policies.
aws organizations describe-organization --query "Organization.{Id:Id,FeatureSet:FeatureSet,Mgmt:MasterAccountId}" --profile learn-management
# The root ID (r-...) and which policy types are enabled on it.
aws organizations list-roots --query "Roots[0].{Id:Id,Policies:PolicyTypes}" --profile learn-management
# OUs directly under the root.
aws organizations list-organizational-units-for-parent --parent-id r-ab12 `
--query "OrganizationalUnits[].{Name:Name,Id:Id}" --output table --profile learn-management
# Everything (accounts and OUs) directly under the Sandbox OU.
aws organizations list-children --parent-id ou-ab12-cd34ef56 --child-type ACCOUNT --profile learn-management
# All accounts in the organisation.
aws organizations list-accounts --query "Accounts[].{Name:Name,Id:Id,Email:Email}" --output table --profile learn-management
# --- Guardrail evidence -------------------------------------------------------
# SCPs attached directly to the Sandbox OU (expect FullAWSAccess and cea-region-guardrail).
aws organizations list-policies-for-target --target-id ou-ab12-cd34ef56 --filter SERVICE_CONTROL_POLICY `
--query "Policies[].Name" --profile learn-management
# --- Budget evidence (management account) -------------------------------------
$acct = aws sts get-caller-identity --query Account --output text --profile learn-management
aws budgets describe-budgets --account-id $acct `
--query "Budgets[].{Name:BudgetName,Limit:BudgetLimit.Amount,Actual:CalculatedSpend.ActualSpend.Amount}" `
--output table --profile learn-management
aws budgets describe-notifications-for-budget --account-id $acct --budget-name cea-monthly-5usd --profile learn-management
# --- Tags for cost allocation (management account) ----------------------------
# Activate the course's tag keys so Cost Explorer can group by them.
aws ce update-cost-allocation-tags-status `
--cost-allocation-tags-status TagKey=Project,Status=Active TagKey=Lab,Status=Active TagKey=Environment,Status=Active TagKey=Owner,Status=Active `
--profile learn-managementNotes on the commands:
- Organizations is a global service hosted in us-east-1; the CLI routes it correctly from your default Region.
list-childrenreturns IDs only;list-accounts-for-parentandlist-organizational-units-for-parentreturn names too.update-cost-allocation-tags-statusfails for keys that have never been seen on a resource yet. Run the module lab first (it tags its bucket), wait up to 24 hours, then activate.- Budgets is a global API; the account ID passed is the management account, because Module 0 created budgets there.
Infrastructure as Code
The remaining Harbourline-style OUs and a tag policy, in Terraform. This is optional in your sandbox organisation (OUs and policies are free), and fully reversible with terraform destroy. Enable the tag-policy type once first: aws organizations enable-policy-type --root-id r-ab12 --policy-type TAG_POLICY --profile learn-management.
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.0"
}
}
}
provider "aws" {
region = "us-east-1"
profile = "learn-management"
}
data "aws_organizations_organization" "this" {}
locals {
root_id = data.aws_organizations_organization.this.roots[0].id
}
resource "aws_organizations_organizational_unit" "security" {
name = "Security"
parent_id = local.root_id
}
resource "aws_organizations_organizational_unit" "infrastructure" {
name = "Infrastructure"
parent_id = local.root_id
}
resource "aws_organizations_organizational_unit" "workloads" {
name = "Workloads"
parent_id = local.root_id
}
resource "aws_organizations_organizational_unit" "prod" {
name = "Prod"
parent_id = aws_organizations_organizational_unit.workloads.id
}
resource "aws_organizations_organizational_unit" "nonprod" {
name = "NonProd"
parent_id = aws_organizations_organizational_unit.workloads.id
}
resource "aws_organizations_organizational_unit" "suspended" {
name = "Suspended"
parent_id = local.root_id
}
# Standardise the four course tag keys and the allowed Environment values.
resource "aws_organizations_policy" "tags" {
name = "cea-tag-standard"
description = "Standard capitalisation and values for course tags"
type = "TAG_POLICY"
content = jsonencode({
tags = {
Project = {
tag_key = { "@@assign" = "Project" }
tag_value = { "@@assign" = ["cea-lab"] }
}
Environment = {
tag_key = { "@@assign" = "Environment" }
tag_value = { "@@assign" = ["learn", "dev", "test", "prod"] }
}
Lab = { tag_key = { "@@assign" = "Lab" } }
Owner = { tag_key = { "@@assign" = "Owner" } }
}
})
}
resource "aws_organizations_policy_attachment" "tags_root" {
policy_id = aws_organizations_policy.tags.id
target_id = local.root_id
}terraform init
terraform plan -out tfplan
terraform apply tfplan
# When finished exploring:
terraform destroyWhy the tag policy does not require tags: a tag policy standardises keys and values (and, with enforced_for, blocks non-compliant values on chosen resource types), but it does not force a tag to exist. To require Project on every new resource you add an SCP condition on aws:RequestTag/Project or check it in IaC pipelines (Module 10).
Complete code
A read-only C# console app that prints your organisation tree. Run it with the management profile (it needs organizations:ListRoots, ListAccountsForParent and ListOrganizationalUnitsForParent, which ManagementAdmin has).
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RootNamespace>Harbourline.OrgTree</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.Organizations" Version="4.1.1.2" />
<!-- Needed at runtime so IAM Identity Center (SSO) profiles resolve. -->
<PackageReference Include="AWSSDK.SSO" Version="4.1.0.2" />
<PackageReference Include="AWSSDK.SSOOIDC" Version="4.1.0.2" />
</ItemGroup>
</Project>using Amazon;
using Amazon.Organizations;
using Amazon.Organizations.Model;
using Amazon.Runtime.CredentialManagement;
// Read-only: prints the organisation tree (root -> OUs -> accounts). Run it with the management profile.
var profileName = Environment.GetEnvironmentVariable("AWS_PROFILE") ?? "learn-management";
var chain = new CredentialProfileStoreChain();
if (!chain.TryGetAWSCredentials(profileName, out var credentials))
{
Console.Error.WriteLine($"Profile '{profileName}' not found. Run: aws configure sso");
return 2;
}
// Organizations is a global service; its endpoint lives in us-east-1.
using var organizations = new AmazonOrganizationsClient(credentials, RegionEndpoint.USEast1);
var roots = await organizations.ListRootsAsync(new ListRootsRequest());
foreach (var root in roots.Roots ?? [])
{
Console.WriteLine($"{root.Name} ({root.Id})");
await PrintChildrenAsync(organizations, root.Id, depth: 1);
}
return 0;
static async Task PrintChildrenAsync(IAmazonOrganizations organizations, string parentId, int depth)
{
var indent = new string(' ', depth * 2);
var accounts = organizations.Paginators.ListAccountsForParent(
new ListAccountsForParentRequest { ParentId = parentId });
await foreach (var page in accounts.Responses)
{
foreach (var account in page.Accounts ?? [])
{
Console.WriteLine($"{indent}- account {account.Name} ({account.Id})");
}
}
var units = organizations.Paginators.ListOrganizationalUnitsForParent(
new ListOrganizationalUnitsForParentRequest { ParentId = parentId });
await foreach (var page in units.Responses)
{
foreach (var ou in page.OrganizationalUnits ?? [])
{
Console.WriteLine($"{indent}+ OU {ou.Name} ({ou.Id})");
await PrintChildrenAsync(organizations, ou.Id, depth + 1);
}
}
}Expected output (fictional IDs):
Root (r-ab12)
- account cea-management (444455556666)
+ OU Sandbox (ou-ab12-cd34ef56)
- account cea-sandbox (111122223333)This code was compiled against the package versions shown on 2026-11-17; it was not run against a live organisation by the author, so your output is the real test.
Code explained line by line
AWSSDK.Organizationsโ the Organizations client package (SDK v4).AWSSDK.SSO/AWSSDK.SSOOIDCโ runtime dependencies that let the SDK use your Identity Center profile.Environment.GetEnvironmentVariable("AWS_PROFILE") ?? "learn-management"โ the organisation can only be read from the management account (or a delegated administrator), so the default is the management profile.CredentialProfileStoreChainandTryGetAWSCredentialsโ load the named profile from%USERPROFILE%\.aws\config; for SSO profiles this uses the token cached byaws sso login.new AmazonOrganizationsClient(credentials, RegionEndpoint.USEast1)โ Organizations is global, with its endpoint in us-east-1, so the Region is fixed.ListRootsAsyncโ every organisation has exactly one root; the loop is defensive.PrintChildrenAsyncโ a recursive local function: print the accounts directly under a parent, then each child OU and its subtree.organizations.Paginators.ListAccountsForParent(...)โ SDK v4 paginators hideNextTokenhandling.Responsesis anIAsyncEnumerableof pages;await foreachfetches the next page only when needed.page.Accounts ?? []โ SDK v4 response collections can benullwhen empty.await PrintChildrenAsync(organizations, ou.Id, depth + 1)โ recursion handles OUs up to five levels deep.
Security considerations
- Management account = crown jewels. No workloads, very few people, short sessions, MFA, and delegated administrators for security services so day-to-day security work happens in a member account.
- Prefer roles to credentials across accounts. Cross-account roles give temporary credentials and leave a CloudTrail record in both accounts. Add
aws:PrincipalOrgIDor specific account conditions to trust policies so a role cannot be assumed from outside your organisation. OrganizationAccountAccessRoleis powerful. It has administrator access in every member account created by Organizations and trusts the management account. Restrict who in the management account can assume it, and monitor its use.- Test SCPs and RCPs in a Policy Staging OU first. A bad deny at the root can lock out every account.
- Protect the logs. Organisation CloudTrail delivered to a separate Log Archive account, with SCPs that deny
cloudtrail:StopLoggingandcloudtrail:DeleteTrailin workloads (Module 5). - Tags are not secrets. Never put personal or confidential data in tags; they appear in billing data and many consoles.
โ Learning shortcut โ not for production
Your learning organisation has two accounts and one person holding every role. A bank separates who manages the organisation, who administers security tooling, who deploys to production and who approves access, and uses separate Log Archive and Security Tooling accounts from day one. Treat your set-up as a model for learning the mechanics, not as a template for a regulated environment.
โ Learning shortcut โ not for production
Activating cost allocation tags and running the Terraform above as ManagementAdmin uses the management account directly. In production these changes go through a pipeline with a narrowly-scoped deployment role, peer review and change records; humans rarely hold write access to the management account.
Banking use case
Harbourline Bank's cloud platform team runs the organisation above. A new Payments Service needs environments. The flow:
- The product team raises an account request:
payments-test(NonProd) andpayments-prod(Prod), cost centreCC-4410, data classification "Confidential โ personal and payment data". - An automated account vending pipeline creates both accounts in the right OUs, applies the baseline (VPC from the network hub, CloudTrail, AWS Config, GuardDuty membership, budget with alerts at 80% and 100%) and tags the accounts.
- Identity Center groups are assigned: developers get a deploy role in NonProd and read-only in Prod; the production deployment role is only usable by the CI/CD pipeline.
- SCPs on Prod deny Regions other than eu-west-2 and eu-west-1, deny disabling security services, and deny creating IAM users. An RCP denies access to S3 and KMS resources from principals outside the organisation.
- Finance sees cost by account and by activated
CostCentretag in Cost Explorer. - When the service is retired, the accounts move to Suspended (deny-all SCP), evidence is exported to the Log Archive, and the accounts are closed after the retention period agreed with records management.
Whether this structure satisfies a particular regulator's segregation or outsourcing expectations is decided by Harbourline's risk, compliance and legal teams; the AWS features are the building blocks.
Common mistakes
- Running workloads in the management account โ it is the first account you have โ SCPs and RCPs cannot protect it; keep it empty.
- One account per team for all environments โ fewer accounts feels simpler โ test and production then share quotas, blast radius and permissions; split per environment.
- Attaching a new SCP to the root without testing โ the console makes it one click โ stage it on a test OU first.
- Expecting an SCP to grant access โ people read "Allow" in
FullAWSAccessโ SCPs only cap; IAM policies grant. - Sharing credentials between accounts โ "it's quicker than setting up a role" โ use cross-account roles with conditions.
- Assuming tag policies make tags mandatory โ the name suggests it โ combine with SCP conditions or IaC checks.
- Forgetting to activate cost allocation tags โ tags exist but Cost Explorer can't group by them โ activate in the management account, and remember costs before activation are not tagged.
- Reusing an email address for a second account โ each account needs a unique root email โ use plus-addressing.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
AWSOrganizationsNotInUseException | The profile points at an account that is not in an organisation | Check sts get-caller-identity; use the management profile |
AccessDeniedException on organizations:ListAccounts from the sandbox | Only the management account or a delegated administrator can list accounts | Use learn-management, or register a delegated administrator for Organizations |
ConstraintViolationException with ACCOUNT_NUMBER_LIMIT_EXCEEDED | Hit the account quota (default 10, sometimes lower for new organisations) | Request an increase in Service Quotas (us-east-1) from the management account |
PolicyTypeNotEnabledException | The policy type (for example TAG_POLICY) is not enabled on the root | aws organizations enable-policy-type --root-id r-... --policy-type TAG_POLICY |
| Cost allocation tag key not listed | The tag has not been seen on a billed resource yet, or less than 24 hours have passed | Tag a resource, wait up to 24 hours, then activate |
AccountMFAEnabled is 0 in the sandbox | Member account has no root credentials (centralised root access) | Expected; confirm with aws iam list-organizations-features in the management account |
Cross-account AssumeRole fails with AccessDenied | Trust policy does not allow the caller, a condition fails, or the caller lacks sts:AssumeRole permission | Check both sides: the role's trust policy and the caller's identity policy |
| Budget alert emails never arrive | Subscriber typo, or the email went to junk | describe-notifications-for-budget and describe-subscribers-for-notification; fix and re-test |
Cost and cleanup
Cost: $0. AWS Organizations, OUs, SCPs, RCPs, tag policies, IAM Identity Center and the read-only CLI and SDK calls in this lesson have no charge. Budgets without budget actions are free (see Cost guardrails). Activating cost allocation tags is free.
Cleanup: keep your Module 0 organisation. If you ran the optional Terraform:
# Removes the extra OUs and the tag policy (OUs must be empty to delete; these are).
terraform destroy
# Confirm only Sandbox remains under the root.
aws organizations list-organizational-units-for-parent --parent-id r-ab12 --query "OrganizationalUnits[].Name" --profile learn-managementThen disable the tag policy type if you no longer want it: aws organizations disable-policy-type --root-id r-ab12 --policy-type TAG_POLICY --profile learn-management.
Exercises
- ๐ข Guided (Lab 1.1): Follow the step-by-step section and produce
docs/lab-1-1-evidence.mdshowing: both caller identities, the root-user summary,FeatureSet: ALL, the SCPs on the Sandbox OU, both budgets and their subscribers, and a note confirming you received budget emails. - ๐ก Challenge: Write an SCP for the Workloads/Prod OU that denies
iam:CreateUserandiam:CreateAccessKeyfor everyone except a role namedhl-platform-breakglass. Attach it to a test OU (createPolicy Staging), move nothing into it, and use the IAM policy simulator or a careful read to explain its effect. - ๐ด Live problem: The Data Platform team says: "We need the analytics vendor's AWS account to read our S3 bucket of transaction exports. We've added their account to the bucket policy, but they get AccessDenied." Your organisation has an RCP that denies S3 access to principals outside the organisation. Decide what should happen and explain the options.
Assignment
Design Harbourline Bank's organisation on one page (docs/org-design.md): an OU diagram (Mermaid is fine), the accounts for the Accounts API, Payments Service and Data Platform across environments, the SCPs/RCPs at each level in one sentence each, which member account is delegated administrator for which security service, and your tagging standard (keys, allowed values, which are cost allocation tags).
Solutions
A complete evidence pack shows: two assumed-role ARNs for AWSReservedSSO_ roles; RootMfa: 1, RootAccessKeys: 0, Users: 0 for the management account; FeatureSet: ALL; FullAWSAccess and cea-region-guardrail on the Sandbox OU; cea-zero-spend and cea-monthly-5usd with your email as subscriber. Why: each item is a control from Module 0 and the command proves it is in force now โ auditors care about current state with a date, not about what someone remembers configuring.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyLongLivedIamCredentials",
"Effect": "Deny",
"Action": ["iam:CreateUser", "iam:CreateAccessKey"],
"Resource": "*",
"Condition": {
"ArnNotLike": {
"aws:PrincipalARN": "arn:aws:iam::*:role/hl-platform-breakglass"
}
}
}
]
}Why: Identity Center users never need IAM users or access keys, so denying them in production removes a whole class of credential leaks. The break-glass exception keeps a documented, monitored emergency path. Staging the SCP on an empty Policy Staging OU lets you check syntax and attachment without affecting any account; in a real bank you would move a test account in and run the actions you expect to be denied and allowed.
The RCP is doing its job: it overrides the bucket policy for principals outside the organisation. Options, in order of preference:
- Don't give the vendor direct access to raw exports. Share a curated, minimised dataset โ for example through a separate bucket in a dedicated "partner exchange" account, or via AWS Data Exchange or Transfer Family (Module 4 and 7).
- If direct access is approved, add a narrow exception to the RCP for that specific bucket and the vendor's account ID (condition on
aws:PrincipalAccountand the resource ARN), place the bucket in an account under an OU dedicated to external sharing, and require encryption with a KMS key the vendor must also be allowed to use. - Never remove the RCP from the whole organisation to fix one integration.
Any option needs a data-sharing agreement, a DPIA covering the vendor as processor, and security review. Why: RCPs implement the bank's data perimeter; exceptions must be explicit, minimal and reviewed.
Knowledge check
Answer: Isolation of permissions (test admins cannot touch production), separate quotas (a test cannot exhaust production capacity), contained blast radius for mistakes and compromises โ plus clean cost attribution and different guardrails per environment.
Answer: No. Effective permissions are the intersection of the SCP ceiling and the IAM policy. DynamoDB is outside the SCP's allowed actions, so it is implicitly denied.
Answer: An SCP caps what principals in your member accounts can do. An RCP caps what can be done to resources in your member accounts, by anyone โ including principals outside your organisation. Neither grants permissions; neither affects the management account.
Answer: So security staff work in a member account (Security Tooling), keeping access to the management account minimal. The management account is not restricted by SCPs, so fewer people and tasks there means less risk.
Answer: User-defined tags must be activated as cost allocation tags in the management account; activation can take up to 24 hours after the key appears, and costs incurred before activation are not attributed to the tag.
Interview questions
- "Walk me through a multi-account structure for a bank." โ Management account with nothing in it; Security OU (log archive, security tooling as delegated admin); Infrastructure OU (network hub, shared services); Workloads split Prod/NonProd with one account per system per environment; Sandbox with budgets; Policy Staging and Suspended OUs. Identity via Identity Center from the corporate IdP; SCP/RCP guardrails; organisation CloudTrail to the log archive.
- "How do engineers access a production account?" โ Through Identity Center with MFA into a read-only role by default; changes go through the pipeline's deployment role; emergency access via a monitored break-glass role with approval.
- "What doesn't an SCP do?" โ It doesn't grant permissions, doesn't affect the management account or service-linked roles, and doesn't restrict external principals accessing your resources (that is what RCPs are for).
- "How do you allocate AWS costs to business units?" โ Account per system/environment first, then activated cost allocation tags (with tag policies for consistency), cost categories, and budgets per account.
Certification practice
A company has 12 AWS accounts and wants a single monthly invoice and to benefit from combined usage for volume pricing. What should it use?
A. AWS Cost Explorer B. Consolidated billing in AWS Organizations C. AWS Budgets D. Separate payment methods per account
Answer: B. Consolidated billing gives one bill and aggregates usage across member accounts for tiered pricing. A analyses costs but does not combine invoices. C alerts on thresholds. D is the opposite of what is asked.
Which AWS Organizations feature lets a central team prevent all accounts in an OU from disabling AWS CloudTrail, even if an account administrator tries?
A. Tag policies B. Service control policies C. IAM user groups D. AWS Cost Explorer
Answer: B. An SCP can deny cloudtrail:StopLogging and cloudtrail:DeleteTrail for all principals in member accounts in the OU. A standardises tags. C exists within a single account and can be changed by its admins. D is a cost tool.
A bank's security team must ensure that no principal outside the company's AWS Organization can read objects in any S3 bucket in its member accounts, even if a developer writes an overly permissive bucket policy. Which solution meets this requirement with the least operational overhead?
A. Use AWS Config rules to detect public bucket policies and remediate them
B. Attach a resource control policy (RCP) that denies S3 access when aws:PrincipalOrgID does not match the organisation
C. Attach an SCP that denies s3:GetObject to all principals
D. Enable S3 Block Public Access in each account
Answer: B. An RCP centrally caps permissions on resources, including for external callers, regardless of bucket policies. A is detective โ data can leak before remediation. C would block your own principals and does not affect external principals at all. D blocks public access but not access granted to a specific external AWS account.
An audit team in account A needs read-only access to CloudTrail logs stored in S3 in account B. What is the most secure approach?
A. Create an IAM user in account B and give the access keys to the audit team B. Create a role in account B with read-only S3 permissions, whose trust policy allows principals from account A, and have auditors assume it C. Make the S3 bucket public for the audit period D. Copy the root user credentials of account B to the audit team
Answer: B. A cross-account role issues temporary credentials and is logged in both accounts. A creates long-lived secrets. C exposes logs to the internet. D violates every root-user practice.
Completion checklist
- I can explain the account as a security, billing, quota and blast-radius boundary
- I can name the policy types in AWS Organizations and when to use SCP vs RCP vs tag policy
- I produced the Lab 1.1 evidence pack and confirmed budget emails reach me
- I activated (or scheduled activation of) the course cost allocation tags
- I sketched an OU layout for Harbourline Bank
Key takeaways
- The AWS account is the strongest isolation boundary; banks use one account per system per environment.
- AWS Organizations adds central billing, structure (root, OUs) and policies that inherit downwards.
- SCPs cap what your principals can do; RCPs cap what can be done to your resources; neither grants access, and neither touches the management account.
- Keep the management account empty; delegate security services to member accounts; access accounts through roles, never shared credentials.
- Tags need standards (tag policies), enforcement (SCPs/IaC) and activation (cost allocation) to be useful for cost and governance.
Further reading
- Managing organization policies (all policy types)
- Resource control policies
- Service control policies
- Quotas and service limits for AWS Organizations
- Recommended OUs and accounts (multi-account whitepaper)
- Organizing your AWS environment using multiple accounts
- What is AWS Control Tower?
- Using user-defined cost allocation tags and activating them
Independent learning resource โ not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.
AWS global infrastructure
Explain Regions, Availability Zones, edge locations, Local Zones and partitions, and choose a Region for a banking workload on latency, cost, features and data residency.
IAM fundamentals
Read and write IAM policies, explain users, groups, roles and temporary credentials, and scope a least-privilege policy for the Module 1 lab.