AWS IAM, the zine class
Learn AWS IAM step by step: who can do what, how AWS decides, how attackers abuse it, and how to protect it. Ada asks interview questions as you read.
IAM controls every request in an AWS account. Many cloud breaches start with a stolen key or a weak IAM setting. Cloud security, AppSec and DevOps interviews ask about IAM a lot. This class teaches IAM from the basics to senior-level detail.
Each drawing plays when you scroll to it. Tap a drawing to go one step at a time. Your answers stay in this browser only.
1Meet the cast
These six characters are in all Zine Classes. In this class, some of them have cloud jobs.
2What is AWS IAM?
AWS Identity and Access Management (IAM) decides who can do which action on which resource. The caller signs almost every AWS API call with its credentials. AWS finds the identity from the credentials. Then AWS checks the policies and allows or denies the call.
AKIA keys.s3:*. OK.- Alice puts an access key in her code to test fast.
- She pushes the code to a public repository. The key is now public.
- Mallory scans public code for strings that start with
AKIA. She finds the key. - Mallory signs AWS API calls with the key from her own computer.
- Servo checks the signature and the policy of the key's user. Both are correct.
- Servo sends the data. For AWS, this is a normal request from Alice's user.
- IAM did its job. The key was the problem. A key is an identity.
Most IAM incidents have one or both of two causes: a leaked credential and too much permission.
An attacker uses a leaked access key from a laptop in another country. What does AWS check before it allows the call?
- The device and the country of the caller
- The signature of the request and the policies that apply to that identity
- That the real owner of the key sent the request
- That the caller passed MFA in the last hour
AWS verifies the signature and evaluates the policies. Anyone with the key and the secret is that identity. Conditions such as aws:SourceIp add checks only if you write them.
3How AWS decides
Each request has four parts. The principal is who calls. The action is what they do, for example s3:GetObject. The resource is the target, written as an ARN. The context holds facts such as the source IP, the time and MFA.
Two rules control all of IAM. All requests start as denied. This is the implicit deny. An explicit Deny always wins over an Allow. The root user is an exception to the first rule. It has full access to its own account. In a member account of an organization, SCPs can still limit the root user.
s3:GetObject on bills/2026.pdf- Browsy sends a request. At the start, the answer is "deny".
- Servo looks for an explicit
Denyin all policies that apply. One match ends the check with a deny. - Organization guardrails (SCPs and RCPs) must allow the action. They cannot grant anything.
- An identity-based or resource-based policy must say
Allow. With no Allow, the implicit deny stays. - A permissions boundary and a session policy, if present, must also allow the action.
- The request passed all checks. Servo allows it.
The result is an intersection. Guardrails, boundaries and session policies only make access smaller. Only identity-based and resource-based policies give access. In one account, an Allow in either of these two is usually sufficient. For cross-account access, both sides must allow the request.
"Walk me through how AWS evaluates a request."
All requests start as denied. If any explicit Deny matches, the result is deny. Then SCPs and RCPs must allow the action. Then an identity-based or resource-based policy must allow it. Then a boundary and a session policy, if present, must allow it. Cross-account requests need an Allow on both sides. Also say that SCPs do not apply to the management account.
4Identities and policies
The identities
- Root user: the first identity of the account. It signs in with the account email address and has full access. Use it only for the few tasks that need it.
- IAM user: a person or app with long-term credentials: a password and up to two access keys (
AKIA…). - IAM group: a set of users that share policies. A group is not a principal.
- IAM role: an identity with no long-term credentials. A trusted principal assumes the role and gets temporary keys (
ASIA…) from AWS STS.
AWS recommends roles for workloads and federation for people. With federation, a person signs in through IAM Identity Center or a company identity provider. Then the person gets a role session.
issuer: GitHub ✓
aud:
sts.amazonaws.com ✓sub:
repo:alice/site:ref:refs/heads/main ✓ASIA… key, secret and session token. They expire.- Browsy is a deploy job in GitHub Actions. It must write to S3. It has no AWS keys.
- GitHub gives the job a signed OIDC token. Browsy sends it to AWS STS and asks for a role.
- Servo reads the role's trust policy. It checks the issuer, the audience and the subject: which repo and which branch.
- Servo sends temporary credentials. The key ID starts with
ASIA. The credentials expire. - Browsy uploads the site. The repository holds no secret that an attacker can steal.
The policy types
A role has two policies. The trust policy says who can assume the role. The permissions policy says what the role can do.
- Identity-based policy: on a user, group or role. AWS managed, customer managed or inline.
- Resource-based policy: on a resource, for example an S3 bucket policy. It names a
Principal. A trust policy is one too. - Permissions boundary: a managed policy that sets the maximum permissions for one user or role.
- SCP and RCP: AWS Organizations policies. An SCP limits the principals in member accounts. An RCP limits the resources.
- Session policy: a caller can pass it when it assumes a role. It makes that session smaller.
arn:aws:iam::111122223333:role/deploy. An instance profile carries a role to an EC2 instance. A service-linked role belongs to an AWS service, and SCPs do not affect it. Access key IDs that start with AKIA are long-term. IDs that start with ASIA are temporary.Classify each policy type.
- A customer managed policy on a role
- A service control policy (SCP)
- An S3 bucket policy
- A permissions boundary
- A session policy passed to
AssumeRole - An inline policy on a user
- A resource control policy (RCP)
Only identity-based and resource-based policies can say "yes". SCPs, RCPs, boundaries and session policies set a maximum. An SCP that allows * gives no access to a user that has no Allow in an identity-based or resource-based policy.
5Reading a policy
A policy is JSON. Each statement has an Effect, an Action, a Resource and an optional Condition. Resource-based policies also have a Principal. Most IAM bugs come from one wildcard or one missing condition in these fields.
PolicyAn identity policy on an app role.
{"Effect": "Allow", "Action": "*", "Resource": "*"}
AttackIf the role's keys leak, the attacker gets full access to the account.
FixList the exact actions and ARNs. Use IAM Access Analyzer to make a policy from real CloudTrail activity.
Policy"All but IAM" for developers.
{"Effect": "Allow", "NotAction": "iam:*", "Resource": "*"}
WhyNotAction with Allow allows all other actions, including new AWS services.
FixUse NotAction only with Deny. Use an Action list for Allow.
PolicyA role trust policy.
{"Effect": "Allow", "Principal": {"AWS": "*"}, "Action": "sts:AssumeRole"}
AttackA principal in any AWS account can assume the role.
Why"*" in Principal means all AWS principals, not "all principals in my account".
FixName the exact account or role ARN. Add aws:PrincipalOrgID as a condition for your organization.
PolicyA role for a monitoring vendor.
{"Effect": "Allow", "Principal": {"AWS": "VENDOR_ACCOUNT_ID"},
"Action": "sts:AssumeRole"} no Condition
AttackA different customer of the vendor enters your role ARN. The vendor then reads your account. This is the confused deputy problem.
FixAdd "Condition": {"StringEquals": {"sts:ExternalId": "VALUE_FROM_VENDOR"}}. The vendor makes a unique ID for each customer.
PolicyA deploy role for GitHub Actions.
"Principal": {"Federated": "arn:aws:iam::111122223333:oidc-provider/token.actions.githubusercontent.com"},
"Condition": {"StringEquals": {"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"}}
no check on token.actions.githubusercontent.com:sub
AttackA workflow in any GitHub repository can get credentials for this role.
WhyBy default, the audience is the same for all GitHub users. Only sub names your repo and branch.
FixMatch sub. IAM now rejects a new or changed trust policy for GitHub without a sub check, or with a sub that is only a wildcard. Old roles that nobody changed can still have this gap.
PolicyA policy that lets a developer start servers.
{"Effect": "Allow", "Action": ["ec2:RunInstances", "iam:PassRole"], "Resource": "*"}
AttackThe developer starts an instance with the admin role and reads its keys.
Whyiam:PassRole lets a principal give a role to a service. If the role has more access, the principal gets that access too.
FixAllow iam:PassRole only on named role ARNs. Add the iam:PassedToService condition.
A role trust policy has "Principal": {"AWS": "*"} and no condition. Who can assume the role?
- Only principals in the same account
- No one, because the caller also needs an Allow for sts:AssumeRole
- A principal in any AWS account that knows the role ARN
- Only AWS services
The star matches all AWS principals. The attacker gives themselves sts:AssumeRole in their own account. Name exact principals, or add aws:PrincipalOrgID.
A vendor asks you to make a cross-account role for its service. What protects you from the confused deputy problem?
- An
sts:ExternalIdcondition with a unique value from the vendor - A secret role name that only the vendor knows
- An
aws:MultiFactorAuthPresentcondition - A maximum session duration of one hour
The vendor sends a unique external ID for each customer. A different customer cannot change that value. For AWS services, use aws:SourceArn and aws:SourceAccount.
6Escalation paths
Privilege escalation in IAM means a principal uses its permissions to get more permissions. Rhino Security Labs listed 21 methods in 2018. Learn the pattern: a permission that changes permissions is an admin permission.
iam:CreatePolicyVersioniam:Attach*Policy,iam:Put*Policyiam:CreateAccessKeyiam:CreateLoginProfileiam:UpdateAssumeRolePolicyiam:PassRole+ a compute actionlambda:UpdateFunctionCode
- Writes an admin version of their own policy
- Attaches
AdministratorAccessto themselves - Makes keys for a stronger user
- Sets a console password for a stronger user
- Adds themselves to a role trust policy
- Runs EC2, Lambda or Glue with a stronger role
- Puts new code in a function that has a strong role
- Give IAM write actions to a pipeline, not to people
- Scope IAM actions to named ARNs
- Use a permissions boundary on created roles
- Allow
PassRoleonly for named roles - Add
iam:PassedToService - Deny IAM changes in an SCP outside the admin role
This policy is on a CI user. Tap the two lines that let the user become an admin.
{"Effect":"Allow","Action":"s3:GetObject","Resource":"arn:aws:s3:::assets/*"}
{"Effect":"Allow","Action":"logs:PutLogEvents","Resource":"*"}
{"Effect":"Allow","Action":"iam:CreatePolicyVersion","Resource":"*"}
{"Effect":"Allow","Action":"ec2:DescribeInstances","Resource":"*"}
{"Effect":"Allow","Action":"iam:GetRole","Resource":"*"}
{"Effect":"Allow","Action":["iam:PassRole","ec2:RunInstances"],"Resource":"*"}
{"Effect":"Deny","Action":"s3:DeleteBucket","Resource":"*"}
Line 3 lets the user write a new default version of its own policy. Line 6 lets the user start an instance with any role, for example an admin role, and read its keys. Line 7 is a Deny, so it only removes access.
7Attacking IAM
RuleTest only systems that you have permission to test. Use your own test accounts. Do not use a key that you find unless the owner gives you written permission. Report a found key to the owner.
You are on an authorised assessment. You get an access key for a test account. Put the steps in the correct order.
- Confirm the scope and the written permission
- Run
aws sts get-caller-identityto see the principal and the account - List the policies of that principal and its groups
- Map the escalation paths with a tool such as PMapper or Pacu
- Show the impact with the smallest safe action in the test account
- Report, and ask the owner to deactivate and rotate the key
Know your limits first. Then learn who the key is, what it can do, and the paths to more access. get-caller-identity needs no permissions, and an explicit Deny does not stop it.
Commands, from simple to deep
# who am I? (works even with an explicit Deny)
aws sts get-caller-identity
# which account owns this key?
aws sts get-access-key-info --access-key-id AKIA...
# what can this user do?
aws iam list-attached-user-policies --user-name ci-bot
aws iam list-groups-for-user --user-name ci-bot
aws iam get-policy-version --policy-arn POLICY_ARN --version-id v1
# test a guess without a real call
aws iam simulate-principal-policy --policy-source-arn USER_ARN --action-names iam:CreatePolicyVersion
# instance metadata on an EC2 host that you test (IMDSv2)
TOKEN=$(curl -X PUT http://169.254.169.254/latest/api/token -H "X-aws-ec2-metadata-token-ttl-seconds: 300")
curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/iam/security-credentials/
Stealing role keys through the metadata service
An EC2 instance gets its role keys from the instance metadata service (IMDS) at 169.254.169.254. With IMDSv1, a plain GET returns the keys. So a server-side request forgery (SSRF) bug in an app can read them.
?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/web-role- Mallory finds an app on EC2 that fetches any URL. This is an SSRF bug.
- Mallory gives it the metadata URL for the role credentials.
- The instance uses IMDSv1. A plain GET returns the role's temporary keys.
- The app sends the response to Mallory. Now she has the keys.
- Mallory uses the keys from her own computer.
- The role can read all buckets, so Servo allows it. The Capital One breach in 2019 used a similar chain.
IMDSv2 makes this harder. The caller must send a PUT to get a session token, then send the token in a header. Most SSRF bugs can only send a GET. IMDSv2 also rejects a PUT with an X-Forwarded-For header.
Why does "IMDSv2 required" stop most SSRF attacks on role keys?
- It moves the metadata service to a secret IP address
- The caller must send a PUT to get a token and then send the token in a header. Most SSRF bugs cannot do both.
- It encrypts the role credentials so that only the SDK can read them
- It only answers requests from the AWS SDK process
Without the X-aws-ec2-metadata-token header, the request gets 401. IMDSv2 is defence in depth. Also fix the SSRF and make the role small.
Real incidents
- Code Spaces, 2014: an attacker got into the AWS console and deleted the instances, buckets and backups. The company closed.
- Uber, 2016: attackers found an AWS access key in plain text in a private GitHub repository of Uber engineers. With the key, they downloaded 25.6 million names and email addresses of Uber users (FTC).
- Capital One, 2019: a misconfigured web application firewall sent requests to the metadata service. Its role had too many permissions. The attacker copied data about more than 100 million people, mostly from credit card applications.
- LastPass, 2022: attackers put malware on a DevOps engineer's home computer. They took keys from the corporate vault and read the S3 production backups.
- Public .env files, 2024: Unit 42 reported a campaign that targeted 110,000 domains with exposed
.envfiles. About 7,000 of the stolen variables belonged to cloud services. In AWS, the attackers made a role withAdministratorAccess. They copied and deleted S3 data and left a ransom note.
"You find an AWS access key in a public repo during a bug bounty. What do you do?"
Do not use the key to look at data. If the program rules allow it, run only aws sts get-caller-identity to show the key is live. Report at once with the repo URL and the commit. Ask the owner to deactivate the key and review CloudTrail. The key stays compromised after a new commit deletes it.
8Defences in layers
No single setting makes IAM safe. Use layers. Each layer stops what the layer before it did not stop. Put the real fix first: remove long-term keys.
AKIA…- Mallory has a stolen key. Five layers protect Alice's account.
- Remove long-term keys. People sign in with IAM Identity Center. Workloads use roles. Their keys expire.
- Least privilege. Each role gets the actions it uses, on the resources it uses. Remove unused access.
- Permissions boundaries. Teams can make roles, but no role can get more than the boundary.
- SCPs and RCPs. The organization denies dangerous actions everywhere, for example turning off CloudTrail.
- Detection. CloudTrail records each call. GuardDuty flags role keys used outside AWS and other odd use.
Common mistakes
- Root user: access keys on root, or no MFA on root. AWS now requires MFA for the root user in all account types.
- Long-lived IAM users for CI: use OIDC federation with a strict
subcondition. - Unused access: old roles, keys and permissions. IAM Access Analyzer finds them.
- IMDSv1 allowed: set "IMDSv2 required" on all instances.
Which actions reduce the risk of a leaked key? Do not choose items that only help you find the leak later.
- Replace IAM users with roles and federation
- Turn on CloudTrail in all regions
- Remove permissions that the principal did not use in 90 days
- Turn on GuardDuty
- Add a permissions boundary to roles that developers create
- Turn on CloudTrail log file validation
Temporary credentials expire. Least privilege makes each key smaller. A boundary stops escalation through new roles. CloudTrail and GuardDuty detect. They do not prevent.
A safe trust policy for GitHub Actions
{
"Effect": "Allow",
"Principal": { "Federated": "arn:aws:iam::111122223333:oidc-provider/token.actions.githubusercontent.com" },
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
"token.actions.githubusercontent.com:sub": "repo:alice/site:ref:refs/heads/main"
}
}
}
The sub line limits the role to one repository and one branch. Give the role only the S3 actions it uses. On github.com, repositories created or renamed after 15 July 2026 use a new sub format with numeric IDs, for example repo:alice@123456/site@456789:ref:refs/heads/main. Check the sub format of your repository before you write the condition.
An SCP on the root of your organization denies cloudtrail:StopLogging. An admin in the management account runs that action. What happens?
- The SCP blocks it
- The SCP blocks it only if the admin has no MFA
- An RCP is necessary to block it
- It works. SCPs do not apply to users or roles in the management account.
SCPs affect only member accounts. Keep the management account almost empty. SCPs also do not affect service-linked roles.
9Senior round
Senior interviews often ask about these topics. Know what each one is and how it works.
sts:ExternalId. Cross-service: when a resource policy trusts an AWS service, add aws:SourceArn or aws:SourceAccount.aws:TokenIssueTime.aws:PrincipalOrgID, aws:ResourceOrgID and VPC endpoint conditions. RCPs (November 2024) put the resource checks in one place.aws:PrincipalTag/team equals aws:ResourceTag/team. Control who can change tags, because a tag change is then a permission change."A developer needs to create roles for their Lambda functions. How do you allow this without giving them admin?"
Allow iam:CreateRole only with the condition iam:PermissionsBoundary set to an approved boundary. Deny changes to that boundary. Allow iam:PassRole only on an agreed role path, and only to Lambda with iam:PassedToService.
"GuardDuty says that role keys from an EC2 instance are in use from an outside IP address. What do you do?"
Revoke the active sessions of the role. Use CloudTrail to list all actions of that session. Look for persistence: new users, keys, roles and trust policy changes. Find the root cause on the instance, for example SSRF with IMDSv1. Fix it and make the role smaller.
A user has AdministratorAccess. A permissions boundary on the user allows only s3:*. The SCP allows *. Can the user call ec2:RunInstances?
- Yes, because AdministratorAccess allows it
- No, because the SCP blocks it
- No. The action must be in the boundary too, and the boundary allows only S3.
- Yes, because boundaries apply only to roles
Effective permissions are the intersection of the identity policy, the boundary and the SCP. Here that is s3:*.
10Interview mode
Example: "What is iam:PassRole and why is it dangerous?"
- What: a permission that lets a principal give a role to an AWS service, for example to an EC2 instance or a Lambda function.
- Attack: with
iam:PassRoleon*andec2:RunInstances, an attacker starts an instance with an admin role and reads its keys. - Fix: allow
PassRoleonly on named role ARNs, withiam:PassedToService. - Detail:
PassRoleis a permission, not an API call, so CloudTrail has noPassRoleevent.
Say each answer aloud before you flip the card. Tick "only the ones I missed" to practise your missed cards.
- What is AWS IAM?
- The AWS service that controls who can do which action on which resource. It checks each API call against the policies.
- What is the difference between a user, a group and a role?
- A user has long-term credentials. A group is a set of users that share policies. A role has no long-term credentials. A trusted principal assumes it and gets temporary credentials.
- Why use roles instead of access keys?
- Role credentials expire. Nothing secret is stored in code. AWS delivers and refreshes them on EC2, Lambda and ECS.
- What is the difference between a trust policy and a permissions policy?
- The trust policy says who can assume the role. The permissions policy says what the role can do.
- What is the principle of least privilege?
- Give each identity only the actions and resources that it needs. Remove access that it does not use.
- What is the difference between an implicit deny and an explicit deny?
- An implicit deny is the default when no policy allows the action. An explicit deny is a Deny statement, and it always wins.
- How do you protect the root user?
- Set strong MFA. Do not create root access keys. Use root only for the tasks that need it.
- What is the difference between identity-based and resource-based policies?
- An identity-based policy is on a user, group or role. A resource-based policy is on a resource and names a principal.
- What do AKIA and ASIA mean?
- Access key IDs that start with
AKIAare long-term keys of a user or the root user. IDs that start withASIAare temporary keys from AWS STS. - How does an app on EC2 get AWS credentials?
- Attach a role through an instance profile. The SDK gets temporary credentials from the instance metadata service.
- What is AWS STS?
- The Security Token Service. It issues temporary credentials, for example through
AssumeRole. - What is the difference between managed and inline policies?
- A managed policy is a separate object with versions, for many identities. An inline policy is part of one identity.
- An access key leaked. What are the first steps?
- Deactivate the key. Check CloudTrail for its calls. Remove what the attacker made, such as new users, keys and roles.
- What does CloudTrail record?
- The AWS API calls: who called, which action, when, from which IP, and the result.
- Explain the policy evaluation order.
- Explicit Deny first. Then SCPs and RCPs must allow. Then an identity or resource policy must allow. Then a boundary and a session policy must allow.
- What is an SCP? What can it not do?
- It sets the maximum permissions for principals in member accounts. It never grants access. It does not affect the management account.
- What is a permissions boundary?
- A managed policy that sets the maximum permissions of one user or role. It grants nothing.
- What is iam:PassRole?
- A permission to give a role to an AWS service. Passing a strong role to a service you control gives you its access.
- Name three IAM privilege escalation paths.
iam:CreatePolicyVersionon your own policy.iam:AttachUserPolicyto add admin to yourself.iam:PassRolewithec2:RunInstancesorlambda:CreateFunction.- How do you give access to a role in a different account?
- The trust policy in account B names a principal in A. A policy in A allows
sts:AssumeRoleon the role. Both sides must allow it. - What is the confused deputy problem?
- A trusted vendor acts on the wrong customer's account. Fix it with
sts:ExternalId, oraws:SourceArnfor AWS services. - Why is NotAction with Allow dangerous?
- It allows every action not in the list, including future services. Use
NotActionwithDenyonly. - How does IMDSv2 stop SSRF attacks?
- A caller must send a
PUTfor a token, then send it in a header. Most SSRF bugs can send only a GET. - How do you connect GitHub Actions to AWS without keys?
- Add GitHub as an OIDC provider. The role's trust policy checks
audandsub. The job gets temporary credentials. - What do IAM condition keys do? Give examples.
- They check the request context, for example
aws:MultiFactorAuthPresent,aws:SourceIpandaws:PrincipalOrgID. - How do you find unused permissions?
- Use IAM last accessed data and the unused access findings of IAM Access Analyzer.
- What does GetCallerIdentity tell an attacker?
- The account ID and the ARN of the user or role that owns the key. It needs no permissions. A Deny does not stop it.
- In one account, is one Allow sufficient?
- Usually yes. An Allow in the identity policy or in the resource policy is sufficient. Role trust policies and KMS key policies must always allow the principal. Cross-account access needs an Allow on both sides.
- What is an RCP and why was it added?
- A resource control policy (November 2024). It sets the maximum permissions on resources in member accounts, without editing each resource policy.
- What is a data perimeter?
- A set of guardrails: only trusted identities get to trusted resources, from expected networks. Use org ID conditions, VPC endpoint policies, SCPs and RCPs.
- How do you revoke temporary credentials?
- They stay valid until they expire. Revoke the role's sessions, which adds a Deny on
aws:TokenIssueTime. - What is role chaining and what is its limit?
- A role session assumes a different role. The new session lasts one hour at most.
- How do you let developers create roles safely?
- Require a boundary with
iam:PermissionsBoundaryonCreateRole. LimitPassRoleto named roles. - What is ABAC in AWS? What is its risk?
- Access based on matching tags. A user who can change tags can change their access.
- What went wrong in the Capital One breach?
- An SSRF in a misconfigured WAF read role keys from the metadata service. The role could read many buckets.
- How do you investigate a role whose keys are used outside AWS?
- Revoke the sessions. Use CloudTrail to find all calls. Look for persistence. Fix the root cause on the workload.
- How does an attacker keep access after you rotate the key they stole?
- The attacker makes new access keys, users or roles. The attacker adds their own account to a trust policy or sets a console password.
- Why is the GitHub OIDC sub condition so important?
- By default, the audience is the same for all GitHub users. Without
sub, any repository can assume the role. - How do you make the management account safe?
- SCPs do not apply to it. Run no workloads in it, and allow very few people in.
- How do you scale least privilege across 200 accounts?
- Use IAM Identity Center for people and SCPs and RCPs as guardrails. Put boundaries on new roles. Keep policies as code and review each change.
11Cheat sheet
- Root: full access, use it rarely
- User: long-term keys (
AKIA) - Role: temporary keys (
ASIA) - Group: holds policies, not a principal
- Grant: identity-based, resource-based
- Limit: SCP, RCP, boundary, session
- Trust policy: who can assume a role
- Roles and SSO, no long keys
- Least privilege
- Boundaries
- SCPs and RCPs
- CloudTrail, GuardDuty
sts get-caller-identity- One escalation path, in a test account
- Which data the role can reach
- An SCP grants access
- Rotation alone fixes a leak
- A role ARN is a secret
- SCPs cover the management account
- Deleting a key from git removes the leak
Did you find an error? Tell me on X. Paper versions: the AWS Security Guide and the AWS Identity, Keys + Ops Security zines.