Secure your AWS account
Lock down the root user, sign in through IAM Identity Center, isolate labs in a sandbox account and restrict Regions with a service control policy.
Assumes: .NET 10 LTS ยท AWS SDK for .NET v4 ยท AWS CLI v2 ยท Region us-east-1. Verified against official sources on 2026-11-17.
Learning objectives
By the end of this lesson you can:
- Explain the AWS Free plan and Paid plan for accounts created after 2025-07-15, and why creating an AWS Organization upgrades a Free plan account.
- Lock down the root user: MFA, no access keys, alternate contacts, IAM access to billing.
- Create an AWS Organization with a Sandbox organisational unit (OU) and a separate sandbox member account.
- Enable IAM Identity Center, create a user and a group, and grant access through permission sets.
- Write, attach and test a service control policy (SCP) that restricts Regions while exempting global services.
Prerequisites
- How this platform works
- An email address that supports plus-addressing (for example
alex+aws-mgmt@example.com) or two separate addresses - A password manager and an MFA method: a passkey/security key (best) or an authenticator app
- Tools: none yet. You will use the AWS Management Console; the CLI commands are for reference and for repeating the setup later
Why this matters in banking
The most damaging AWS incidents rarely start with an exotic exploit. They start with a root password reused from another site, an access key committed to GitHub, or an administrator who "temporarily" used a production account for an experiment. Banks prevent this with the same controls you build here: break-glass credentials locked in a safe, named identities with MFA, separate accounts per environment, and organisation-wide guardrails that even an administrator cannot switch off. Regulators and auditors (for example under the UK's operational-resilience rules or the EU's DORA) expect to see exactly this kind of segregation and evidence.
The idea in plain language
When you create an AWS account you get one all-powerful login: the root user (the email address and password you signed up with). It can do anything, including close the account. You should use it for almost nothing.
Instead you will:
- Put the root user in a "safe": strong password, MFA, no access keys, and a recovery path.
- Turn the account into the management account of an AWS Organization โ a container that groups AWS accounts and applies policies to them.
- Create a second account, the sandbox, where every lab runs.
- Turn on IAM Identity Center (the AWS single sign-on service) and create a normal user for yourself. You sign in through a browser with MFA and receive temporary credentials that expire.
- Attach a service control policy (SCP) to the sandbox that blocks requests to Regions you do not use.
Analogy: The root user is the bank's master vault key โ kept in a sealed envelope in the safe, used only with two witnesses. IAM Identity Center is the staff badge system: everyone gets a named badge, it needs a PIN (MFA), and it stops working at the end of the shift. The sandbox account is the training branch across the road. The SCP is head office's rule that the training branch may only trade in two currencies, whatever the branch manager says.
What problem each service solves
| Service | What it is | Why it exists | Limitations and sharp edges |
|---|---|---|---|
| Root user | The account's original identity | Owns the account; a few tasks need it | Cannot be restricted by IAM policies in a standalone or management account; losing it can mean losing the account |
| AWS Organizations | Groups accounts, consolidated billing, organisation policies | Isolation between workloads and central guardrails | Free, but creating one upgrades a Free plan account to the Paid plan; SCPs need "all features" |
| IAM Identity Center | Workforce single sign-on to AWS accounts and apps | Named users, MFA, short-lived credentials, one place to manage access | Account access (permission sets) needs an organisation instance in the management account; free of charge |
| Permission set | A template of IAM policies | Assigning it to a user/group on an account creates an IAM role there | Session duration 1โ12 hours; changes reprovision the role in every assigned account |
| SCP | An organisation policy that caps what IAM principals in member accounts can do | Guardrails that account admins cannot remove | Never grants permissions; does not affect the management account or service-linked roles; max size 10,240 characters |
Free plan vs Paid plan (accounts created on or after 2025-07-15)
AWS changed its Free Tier for new customers in July 2025. Checked against the official Choosing a plan page on 2026-11-17:
| Free plan | Paid plan | |
|---|---|---|
| Credits | USD 100 at sign-up, plus up to USD 100 more by completing activities (USD 20 each) | Same credits |
| Services | Selected services only; no Savings Plans, Reserved Instances or some Marketplace offers | All services and features |
| Charges | None โ usage is capped by your credits | Pay-as-you-go for anything not covered by credits or always-free allowances |
| End of plan | After 6 months or when credits run out, whichever comes first | Does not expire or close |
| What happens at the end | The account closes automatically; AWS keeps your content for 90 days, during which you can upgrade, then deletes it | โ |
| Always-free offers | Yes (30+ services with monthly limits) | Yes, plus short-term trials of some services |
| Other promotional credits | Not eligible | Eligible |
| Automatic upgrade | Happens if you join AWS Organizations, set up an AWS Control Tower landing zone, and in a few other cases | โ |
The credit-earning activities listed by AWS are: launch an EC2 instance, try a model in the Amazon Bedrock playground, set up a cost budget in AWS Budgets, build a Lambda web app, create an RDS database and create a DynamoDB table. The budget activity costs nothing and you will do it in the next lesson anyway. Credits expire 12 months after the account is created โ VERIFY (stated on the Secrets Manager pricing page, not on the Free Tier plan page).
Choose your path
- Path A โ the course default. It mirrors how banks run AWS, unlocks SCPs and Identity Center, and keeps the account alive. You receive the same credits, so careful learners still pay nothing. The cost guardrails in the next lesson are mandatory.
- Path B โ maximum safety for the first weeks. A Free plan account cannot be charged, but it cannot use Organizations or SCPs, and the Identity Center account instance available to a standalone account does not provide access to AWS accounts. Use an IAM user with a console password and MFA (never access keys) and sign in from the CLI with
aws login(AWS CLI 2.32.0 or later), which issues short-lived credentials. The lab supports both paths.
You can do Path B first and Path A later
Creating an Organization from the Free plan account converts it to the Paid plan at that moment, and remaining credits carry over to future bills. You do not need to create a new account.
Microsoft / Azure comparison
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
| Azure account owner / Global Administrator break-glass account | Root user of each AWS account | Every AWS account has its own root user; in an Organization you can remove member-account root credentials centrally |
| Entra ID tenant | IAM Identity Center (identity source) | Identity Center can use its own directory, Active Directory or an external IdP such as Entra ID (Module 5) |
| Entra ID groups + Azure RBAC role assignment on a subscription | Identity Center group + permission set assigned to an account | A permission set is materialised as an IAM role named AWSReservedSSO_<name>_<suffix> in the account |
| Management groups + subscriptions | Organization root + OUs + accounts | AWS accounts are the strongest isolation boundary โ closer to separate tenants than separate resource groups |
Azure Policy with deny effect / allowed locations | SCP with aws:RequestedRegion | SCPs filter IAM permissions; they do not inspect resource properties the way Azure Policy does |
| PIM just-in-time elevation | Separate permission sets with short session durations | Native time-bound elevation needs extra tooling (Module 5) |
az login | aws sso login (or aws login on Path B) | Each CLI profile pins one account and one role |
Architecture
Security-boundary view: the management account is your crown jewel โ it can change SCPs, create accounts and read the bill, and SCPs do not restrict it. So you keep workloads out of it entirely and use it only through short sessions. The sandbox is the blast-radius container: anything you break or leak there is limited to that account and to the Regions the SCP allows.
Step-by-step implementation
Create the account and choose a plan
Go to the AWS sign-up page from aws.amazon.com/free. Use a dedicated address such as alex+aws-mgmt@example.com and an account name like cea-management. Choose Paid plan for Path A or Free plan for Path B. Store the root password in your password manager.
Lock down the root user
Signed in as root, open the account menu (top right) โ Security credentials:
- Multi-factor authentication (MFA) โ Assign MFA device. Prefer a passkey or FIDO2 security key; an authenticator app is acceptable. Register a second device if you have one. AWS now enforces MFA for root users, but you still have to register a device.
- Access keys โ there must be none. If you see any, deactivate and delete them.
- Note the account ID shown on the page.
Then open Account (account menu โ Account):
- Alternate contacts โ add Billing, Operations and Security contacts (you can use plus-addresses of your own email). AWS uses these for billing and security notices, so they protect you if the root inbox is missed.
- IAM user and role access to Billing information โ Edit โ Activate IAM Access. Without this, even an administrator role cannot see the bill. This is one of the few tasks that only the root user can do.
Create the Organization (Path A only)
Console โ AWS Organizations โ Create an organization. This creates it with all features enabled and makes this account the management account. If you are on the Free plan, this upgrades you to the Paid plan.
Then in Organizations:
- AWS accounts โ Organize/Root โ Actions โ Create new organizational unit named
Sandbox. - Add an AWS account โ Create an AWS account: name
cea-sandbox, emailalex+aws-sandbox@example.com. Leave the IAM role name asOrganizationAccountAccessRoleโ it is your break-glass way into the account from the management account. - When the account appears, select it โ Actions โ Move โ choose the
SandboxOU.
Centralise root access for member accounts (Path A)
Console โ IAM โ Root access management โ Enable, and select both Root credentials management and Privileged root actions in member accounts. New member accounts created through Organizations then have no root credentials at all, and you can run the few root-only tasks (such as unlocking a mis-configured bucket policy) from the management account.
Enable IAM Identity Center
Make sure the Region selector shows US East (N. Virginia) us-east-1, then Console โ IAM Identity Center โ Enable. On Path A this creates an organisation instance. Then:
- Settings โ Authentication โ Multi-factor authentication โ Configure: require MFA every time users sign in, allow security keys/passkeys and authenticator apps, and require users to register a device at sign-in if they have none.
- Note the AWS access portal URL on the Dashboard (it looks like
https://d-1234567890.awsapps.com/start). You need it for the CLI. - Users โ Add user:
alex.learner, your email. Accept the invitation email, set a password and register MFA. - Groups โ Create group:
cea-learners, addalex.learner.
Create permission sets and assign them
Multi-account permissions โ Permission sets โ Create permission set โ Predefined permission set:
| Permission set | Policy | Session duration | Assign to |
|---|---|---|---|
SandboxAdmin | AdministratorAccess | 4 hours | cea-sandbox account |
BillingViewer | AWSBillingReadOnlyAccess (choose Custom permission set and attach this AWS managed policy if it is not in the predefined list) | 1 hour | management account |
ManagementAdmin | AdministratorAccess | 1 hour | management account (use rarely) |
Then AWS accounts โ select cea-sandbox โ Assign users or groups โ group cea-learners โ SandboxAdmin. Repeat for the management account with BillingViewer and ManagementAdmin.
Sign out of root. From now on you sign in through the access portal URL. Treat any root sign-in as an event worth writing down.
Turn on SCPs and attach the Region guardrail
Organizations โ Policies โ Service control policies โ Enable service control policies. Then Create policy named cea-region-guardrail with the JSON from the IaC section, and attach it to the Sandbox OU โ not to the root. AWS recommends testing SCPs on an OU first because a bad SCP can lock everyone out of member accounts.
Test the guardrail
Sign in to the access portal โ cea-sandbox โ SandboxAdmin โ Management console. Switch the Region to Europe (Frankfurt) eu-central-1 and open the SQS console. You should see an access-denied message that mentions an explicit deny in a service control policy. Switch back to us-east-1 and the console works. The CLI section shows the same test from a terminal.
The Region guardrail explained
The policy denies every action ("Effect": "Deny") except the ones listed in NotAction, when the requested Region is not one you approved, unless the caller is the break-glass role.
- Why exempt some services? Global services such as IAM, Organizations, STS, Route 53, CloudFront and the billing tools have a single control plane. Their requests are signed for one Region (usually us-east-1). If your allowed list ever drops us-east-1 โ for example, a UK bank that allows only eu-west-2 for data-residency reasons โ those calls would be blocked and you could not manage users or see the bill. The exemptions keep global management working.
- Why us-east-1 and eu-west-2? us-east-1 is this course's default Region and hosts global-service endpoints. eu-west-2 (London) is included so you can practise UK data-residency scenarios later.
- Why exempt
OrganizationAccountAccessRole? So that, from the management account, you can still reach and clean up the sandbox in an emergency. - What it does not do: it does not delete resources already running in other Regions, it does not stop AWS-managed service-linked roles, and it does not apply to the management account.
This policy is modelled on the patterns in the MIT-0 licensed aws-samples/service-control-policy-examples repository (Region-controls). That repository warns, and so do we, that exemption lists go out of date as AWS adds global features โ review yours when you meet an unexpected deny.
AWS Console instructions
Summary of navigation used above (no screenshots; menu names checked 2026-11-17):
- Root MFA and access keys: account menu โ Security credentials
- Alternate contacts and billing access: account menu โ Account โ Alternate contacts / IAM user and role access to Billing information
- Organization: AWS Organizations โ AWS accounts, Policies โ Service control policies
- Root access management: IAM โ Root access management
- Identity Center: IAM Identity Center โ Users / Groups / Permission sets / AWS accounts / Settings
AWS CLI
Run these from the management account after Identity Center exists, using a learn-management profile for ManagementAdmin (set up in Tooling setup), or from AWS CloudShell in the console. Placeholder IDs are fictional.
# Who am I? Confirms you are in the management account with the expected role.
aws sts get-caller-identity --profile learn-management
# Create the organization with all features (needed for SCPs).
aws organizations create-organization --feature-set ALL --profile learn-management
# Find the organization root ID (starts with r-).
aws organizations list-roots --query "Roots[0].Id" --output text --profile learn-management
# Create the Sandbox OU under the root.
aws organizations create-organizational-unit --parent-id r-ab12 --name Sandbox --profile learn-management
# Create the sandbox member account (asynchronous) and poll its status.
aws organizations create-account --email alex+aws-sandbox@example.com --account-name cea-sandbox --profile learn-management
aws organizations describe-create-account-status --create-account-request-id car-0123456789abcdef0123456789abcdef --profile learn-management
# Move the new account from the root into the Sandbox OU.
aws organizations move-account --account-id 111122223333 --source-parent-id r-ab12 --destination-parent-id ou-ab12-cd34ef56 --profile learn-management
# Enable SCPs, create the guardrail from the JSON file, attach it to the OU.
aws organizations enable-policy-type --root-id r-ab12 --policy-type SERVICE_CONTROL_POLICY --profile learn-management
aws organizations create-policy --name cea-region-guardrail --type SERVICE_CONTROL_POLICY --description "Deny requests outside us-east-1 and eu-west-2" --content file://region-guardrail.json --profile learn-management
aws organizations attach-policy --policy-id p-examplepolicy1 --target-id ou-ab12-cd34ef56 --profile learn-management
# Centralise root access for member accounts.
aws organizations enable-aws-service-access --service-principal iam.amazonaws.com --profile learn-management
aws iam enable-organizations-root-credentials-management --profile learn-management
aws iam enable-organizations-root-sessions --profile learn-management
# Set an alternate security contact (fictional UK drama-range phone number).
aws account put-alternate-contact --alternate-contact-type SECURITY --name "Alex Learner" --title "Account owner" --email-address alex+aws-security@example.com --phone-number "+44 7700 900123" --profile learn-managementTesting the SCP from the sandbox profile:
# Allowed Region: returns a (possibly empty) list of queues.
aws sqs list-queues --region us-east-1 --profile learn-sandbox
# Blocked Region: fails with an access-denied error that mentions
# "explicit deny in a service control policy".
aws sqs list-queues --region eu-central-1 --profile learn-sandbox
# Global service: still works, because sts is exempt and its calls are signed for us-east-1 anyway.
aws sts get-caller-identity --profile learn-sandboxIdentity Center permission sets can also be scripted (useful when you rebuild):
# Instance ARN and identity store ID of your Identity Center instance.
aws sso-admin list-instances --profile learn-management
# Create the SandboxAdmin permission set with a 4-hour session (ISO 8601 duration).
aws sso-admin create-permission-set --instance-arn arn:aws:sso:::instance/ssoins-1234567890abcdef --name SandboxAdmin --session-duration PT4H --profile learn-management
# Attach the AWS managed AdministratorAccess policy to it.
aws sso-admin attach-managed-policy-to-permission-set --instance-arn arn:aws:sso:::instance/ssoins-1234567890abcdef --permission-set-arn arn:aws:sso:::permissionSet/ssoins-1234567890abcdef/ps-0123456789abcdef --managed-policy-arn arn:aws:iam::aws:policy/AdministratorAccess --profile learn-management
# Assign the group to the sandbox account with that permission set.
aws sso-admin create-account-assignment --instance-arn arn:aws:sso:::instance/ssoins-1234567890abcdef --target-id 111122223333 --target-type AWS_ACCOUNT --permission-set-arn arn:aws:sso:::permissionSet/ssoins-1234567890abcdef/ps-0123456789abcdef --principal-type GROUP --principal-id 90676e2d-0000-0000-0000-000000000000 --profile learn-managementInfrastructure as Code
The guardrail policy document (save as region-guardrail.json):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyOutsideApprovedRegions",
"Effect": "Deny",
"NotAction": [
"account:*",
"aws-portal:*",
"billing:*",
"budgets:*",
"ce:*",
"cur:*",
"freetier:*",
"invoicing:*",
"payments:*",
"tax:*",
"pricing:*",
"cloudfront:*",
"globalaccelerator:*",
"health:*",
"iam:*",
"organizations:*",
"route53:*",
"route53domains:*",
"shield:*",
"sts:*",
"support:*",
"trustedadvisor:*",
"ec2:DescribeRegions",
"s3:ListAllMyBuckets",
"s3:GetAccountPublic*",
"s3:PutAccountPublic*"
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": ["us-east-1", "eu-west-2"]
},
"ArnNotLike": {
"aws:PrincipalARN": "arn:aws:iam::*:role/OrganizationAccountAccessRole"
}
}
}
]
}Run with the learn-management profile. State stays local for this exercise; Module 10 moves state to S3 with locking.
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.73" # latest on the Terraform Registry on 2026-11-17 was 6.73.0
}
}
}
provider "aws" {
region = "us-east-1"
profile = "learn-management"
}
data "aws_organizations_organization" "this" {}
resource "aws_organizations_organizational_unit" "sandbox" {
name = "Sandbox"
parent_id = data.aws_organizations_organization.this.roots[0].id
}
resource "aws_organizations_policy" "region_guardrail" {
name = "cea-region-guardrail"
description = "Deny requests outside us-east-1 and eu-west-2"
type = "SERVICE_CONTROL_POLICY"
content = file("${path.module}/region-guardrail.json")
}
resource "aws_organizations_policy_attachment" "sandbox" {
policy_id = aws_organizations_policy.region_guardrail.id
target_id = aws_organizations_organizational_unit.sandbox.id
}terraform init
terraform plan -out tfplan
terraform apply tfplanComplete code
The runnable C# code for this module is the verify-setup lab, which proves your Identity Center profile works. This lesson's "code" is the policy JSON and IaC above.
Code explained line by line
Walking through region-guardrail.json:
"Version": "2012-10-17"โ the IAM policy language version. Always this value; it is not a date you update."Effect": "Deny"โ SCPs are best used as deny lists. An explicit deny beats any allow anywhere."NotAction": [...]โ "every action except these". The listed services are global or billing services that must keep working."s3:ListAllMyBuckets"โ listing buckets is a global call; exempting it lets the console and the lab list buckets from any Region setting."Resource": "*"โ applies to all resources; SCPs commonly use*."StringNotEquals": "aws:RequestedRegion"โ the condition key holding the Region the request was sent to. The deny applies only when it is not one of the listed Regions."ArnNotLike": "aws:PrincipalARN"โ skip the deny for the break-glass role. Both conditions must be true (AND) for the deny to apply.
In the Terraform: data "aws_organizations_organization" reads the existing organisation; aws_organizations_policy creates the SCP from the same file, so console and code never drift; aws_organizations_policy_attachment attaches it to the OU only.
Security considerations
- Root user: MFA on, no access keys, password in a password manager, alternate contacts set. Set up an alert for root sign-ins later (Module 5 covers EventBridge rules on CloudTrail events).
- Never create IAM access keys for daily work. Identity Center (Path A) or
aws login(Path B) give you temporary credentials. - Management account hygiene: no workloads, minimal people, short sessions. SCPs cannot protect it.
- Least privilege in the sandbox is deliberately relaxed โ see below.
โ Learning shortcut โ not for production
SandboxAdmin uses AdministratorAccess because labs create IAM roles, KMS keys and networks. That is acceptable in an isolated sandbox with a Region guardrail and budgets. In a bank, developers get narrowly scoped permission sets, often with permission boundaries, separate break-glass roles with approval workflows, and SCPs that also deny disabling CloudTrail, GuardDuty or Config. Module 5 and Module 15 build that version.
โ Learning shortcut โ not for production
One person holds every role here. Banks require segregation of duties: the people who approve access, deploy code and read the bill are different, and every change is reviewed and logged. Treat this setup as a personal lab, not as a template you can hand to an auditor.
Banking use case
"Harbour Bank" (fictional) runs one AWS Organization with OUs for Security, Infrastructure, Workloads-Prod, Workloads-NonProd and Sandbox. Developers can create sandbox accounts through an automated process; each sandbox has a monthly budget and an SCP that allows only eu-west-2 and us-east-1 and denies turning off CloudTrail. Workforce identities come from the bank's Entra ID through IAM Identity Center, so leavers lose AWS access the moment HR disables them. The root users of all member accounts have no credentials; the management account's root credentials are split between two security officers and stored in a safe. Whether this satisfies a specific regulation (for example UK GDPR accountability or PRA outsourcing expectations) is decided by the bank's risk, compliance and legal teams โ AWS features are building blocks, not compliance in themselves.
Common mistakes
- Doing daily work as root โ it is the first login you have โ a phished root password can close the account. Create the Identity Center user immediately and sign out of root.
- Creating an IAM user with access keys "just for the CLI" โ older tutorials do this โ keys leak via Git, screenshots and backups. Use
aws sso loginoraws login. - Attaching the SCP to the organization root first โ it looks tidier โ a mistake can lock out every member account. Attach to the Sandbox OU and test.
- Forgetting that SCPs do not apply to the management account โ people assume "organisation-wide" means everywhere โ never run labs in the management account.
- Not activating IAM access to billing โ admins see "access denied" on billing pages โ only root can activate it; do it once.
- Using the same email for every account โ AWS needs a unique email per account โ use plus-addressing.
- Expecting the Free plan to survive Organizations โ the upgrade is automatic โ decide your path first.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
"You don't have permission" on Billing pages while using ManagementAdmin | IAM access to billing not activated | Sign in as root once โ Account โ IAM user and role access to Billing information โ Activate |
| Access denied "with an explicit deny in a service control policy" | The Region guardrail (working as intended), or a missing exemption for a global service | Use us-east-1 or eu-west-2; if a global service is blocked, add its prefix to NotAction |
| Identity Center console offers only an account instance | You are not in the management account, or Organizations is not set up | Create the Organization first, then enable Identity Center from the management account |
| Your user sees no accounts in the access portal | No assignment, or provisioning not finished | IAM Identity Center โ AWS accounts โ check assignments; wait a minute and refresh |
create-account stays IN_PROGRESS | Account creation is asynchronous | Poll describe-create-account-status; it usually completes within minutes |
ConstraintViolationException creating an account | Email already used, or an account quota reached | Use a new plus-address; check Organizations quotas |
| Invitation email never arrives | Spam filter | Check junk; resend from IAM Identity Center โ Users โ user โ Reset password / Send email |
Cost and cleanup
Cost: $0. AWS Organizations, IAM Identity Center, SCPs and root access management have no charge. Creating an Organization moves a Free plan account to the Paid plan, so from this point the guardrails in Cost guardrails are essential.
Cleanup: none. Keep this setup for the whole course. If you ever abandon it:
# Close the sandbox member account from the management account (irreversible after the post-closure period).
aws organizations close-account --account-id 111122223333 --profile learn-managementExercises
- ๐ข Guided: Follow the steps to create the Organization, Sandbox OU, sandbox account, Identity Center user, permission sets and SCP. Prove the SCP works with the two
aws sqs list-queuescommands. - ๐ก Challenge: Change the guardrail so the sandbox may use only eu-west-2. Predict which console pages break, test, and fix the policy so IAM and billing still work.
- ๐ด Live problem: A colleague messages: "My CDK deploy in the sandbox fails with AccessDenied on
cloudformation:CreateStack, but I'm admin!" Theircdk.jsontargetseu-central-1. Diagnose without changing the SCP, and explain to them how to read the error.
Assignment
Add a docs/account-setup.md to your learning-journal repository describing your organisation: OUs, accounts (with fictional IDs), permission sets and session durations, the SCP and its exemptions, and a "break-glass" section explaining how you would regain access if you lost your MFA device. Include the region-guardrail.json and Terraform files.
Solutions
You should see the queue list (or an empty result) in us-east-1, and an error mentioning an explicit deny in a service control policy for eu-central-1. aws sts get-caller-identity works in both cases because sts:* is exempt and STS is reachable from the allowed Region. Why: the SCP evaluates aws:RequestedRegion on every API call made by principals in the sandbox account.
Set "aws:RequestedRegion": ["eu-west-2"]. Global services whose requests go to us-east-1 (IAM, Organizations, STS global endpoint, Route 53, CloudFront, billing APIs) keep working only because they are in NotAction. Services that are regional but often used from us-east-1 โ for example ACM certificates for CloudFront, which must live in us-east-1 โ will now fail; you would need a narrow exemption for those actions. Identity Center itself lives in the management account (not restricted by SCPs), so sign-in keeps working. Why: this is exactly the trade-off a UK bank faces when enforcing data residency.
The error message says "with an explicit deny in a service control policy". An explicit deny in an SCP overrides AdministratorAccess. The fix is to deploy to an approved Region: set env in the CDK app (or AWS_REGION) to us-east-1 or eu-west-2 and redeploy. Teach the colleague to read three parts of every access-denied message: who (the principal ARN), what (the action), and why (identity policy, resource policy, permission boundary or SCP). Why: in AWS, "admin" means "admin within the guardrails"; SCPs sit above account-level permissions.
Knowledge check
Answer: Register MFA, confirm there are no root access keys (delete any), and set alternate contacts โ plus activate IAM access to billing and store the password in a password manager.
Answer: No. SCPs never affect users or roles in the management account. That is why workloads should not run there.
Answer: It closes automatically. AWS keeps the content for 90 days, during which you can upgrade to the Paid plan; after that the account and its resources are deleted.
Answer: An IAM role named AWSReservedSSO_<PermissionSetName>_<suffix>, which Identity Center users assume. Its maximum session is set by the permission set's session duration (1โ12 hours).
Interview questions
- "How would you set up AWS access for a team of 20 developers?" โ IAM Identity Center connected to the corporate IdP, groups mapped to permission sets per environment, no IAM users or long-lived keys, separate accounts per environment under OUs, SCP guardrails, and CloudTrail organisation trail for audit.
- "What's the difference between an SCP and an IAM policy?" โ An IAM policy grants permissions to a principal; an SCP only sets the maximum permissions for principals in member accounts. Effective permissions are the intersection, and an explicit deny anywhere wins.
- "Why multiple AWS accounts?" โ Accounts are hard isolation boundaries for security, quotas and billing; they limit blast radius and make segregation of duties and cost attribution simple.
Certification practice
A company has just created an AWS account. Which action follows AWS best practice for the root user?
A. Create access keys for the root user and store them in a password manager B. Enable MFA on the root user and use an IAM Identity Center user for daily tasks C. Share the root password with the operations team so they can respond to incidents D. Use the root user only from the AWS CLI
Answer: B. A is wrong because root access keys should not exist. C breaks accountability and least privilege. D is wrong because the root user should not be used for routine work through any interface.
A bank must ensure developers in its non-production accounts can create resources only in eu-west-2, while still managing IAM and viewing billing. Accounts are in an AWS Organization. What is the most operationally efficient solution?
A. Attach an IAM policy to every developer role that denies other Regions
B. Attach an SCP to the non-production OU that denies actions when aws:RequestedRegion is not eu-west-2, exempting global services
C. Use AWS Config rules to delete resources created in other Regions
D. Remove other Regions from the console Region selector
Answer: B. One SCP on the OU covers every principal in every account and cannot be removed by account admins. A must be repeated on every role and can be changed by account admins. C is detective and reactive; resources exist (and cost money) before deletion. D is not a security control.
A learner on the AWS Free plan creates an AWS Organization. What happens to the account plan?
A. Nothing; the Free plan continues for six months B. The account closes immediately C. The account is automatically upgraded to the Paid plan D. The Organization cannot be created on a Free plan account
Answer: C. Joining AWS Organizations is one of the actions that automatically upgrades a Free plan account. A and D are incorrect according to the Free Tier plan documentation; B confuses this with the end-of-plan closure.
Completion checklist
- Root user: MFA registered, zero access keys, alternate contacts set, IAM access to billing activated
- Organization created with a Sandbox OU and a
cea-sandboxaccount (Path A), or IAM user with MFA and no keys (Path B) - Identity Center user with MFA; permission sets
SandboxAdmin,BillingViewer,ManagementAdminassigned -
cea-region-guardrailattached to the Sandbox OU and tested in an allowed and a denied Region - I signed out of root and recorded where its credentials are stored
Key takeaways
- The root user is a break-glass identity: MFA, no keys, almost never used.
- Accounts are AWS's strongest isolation boundary; labs belong in a separate sandbox account.
- IAM Identity Center gives named users, MFA and temporary credentials; permission sets become IAM roles in each account.
- SCPs cap permissions in member accounts, never grant anything and never restrict the management account.
- On accounts created after 2025-07-15, creating an Organization switches a Free plan account to the Paid plan โ so cost guardrails come next.
Further reading
- Choosing a plan (AWS Free Tier plans)
- AWS account root user and root user best practices
- Centralize root access for member accounts
- Creating an organization and creating member accounts
- Service control policies and SCP evaluation
- IAM Identity Center โ getting started, organisation vs account instances, permission set session duration
- Login with console credentials (
aws login) - Organizing your AWS environment using multiple accounts (whitepaper)
- aws-samples/service-control-policy-examples
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.
How this platform works
Learn how lessons, labs, cost labels, exercise tiers and the AI assistant fit together so you can study efficiently and safely.
Cost guardrails: budgets, alarms and the usual traps
Set up a zero-spend budget, a small monthly budget, a billing alarm, Cost Anomaly Detection and Free Tier alerts, and learn which resources quietly cost money.