Explain an IAM decision from the applicable policies
A role can assume its target role successfully. Its first write fails even though an identity policy allows the operation. The account’s SCP explicitly denies that write. Which change would actually matter?
Explain an IAM decision from the applicable policies
Define trust and permission policies, compare attribute- and role-based choices, simulate a refusal and identify unused access.
Work through the decision
A role can assume its target role successfully. Its first write fails even though an identity policy allows the operation. The account’s SCP explicitly denies that write. Which change would actually matter?
Check your reasoning
The explicit deny governs this request. A second identity allow will have no effect. Determine whether the SCP is intentional. If the operation is authorized, change the relevant control through its owner and retest only the required action.
Interpret the evidence
- Trust policy
- Defines which principals and conditions may assume a role. It governs entry into the role.
- Permissions boundary
- Limits the identity permissions that can be effective for a principal. It does not supply the underlying identity grant.
- Attribute-based access control
- Conditions can compare trusted principal attributes with resource tags. Control who can change the attributes.
- Explicit deny
- An applicable explicit deny overrides an allow for the same action and resource.
- IAM Access Analyzer
- External-access findings highlight resource policies allowing access beyond a chosen trust zone. Unused-access analysis helps review excess privileges.
Practice the guide skills
- Separate who may assume a role from what the resulting session can do. Check the target resource policy when access crosses accounts. Watch 2:12:12
- Compare a fixed job-function role with tag-based access across many projects. Restrict who can set the attribute that conveys access. Watch 2:15:24
- Write a plain-language allow statement specifying action, resource and condition for a task. Check boundaries and organization policies for additional constraints. Watch 2:19:11
- Trace a denied request through applicable identity, session, resource and organization policies. Use policy simulation as supporting evidence and check service-specific behavior. Watch 2:21:17
- Review external and unused access findings, verify dependencies with the owner and remove unnecessary permissions in a measured change. Watch 2:22:52
Official objectives for this lesson
Distinguish a missing grant from an explicit deny
A same-account role uses identity permissions with no applicable resource grant. Read the controls from left to right.
Action Identity allow Boundary permits SCP explicit deny
ReadReport yes yes no
WriteReport yes yes yes
DeleteReport yes no no
ReadReport is allowed under these assumptions. WriteReport is explicitly denied and DeleteReport exceeds the boundary. Adding another identity allow cannot resolve either failure.
Lab · trace an identity permission through three controls
Use Python 3 and the supplied fictional requests. The fixture models same-account requests controlled by an identity allow, a permissions boundary and an explicit deny in an otherwise permissive SCP. Print the reason for each decision before changing the grants.
identity = {"read-report", "write-report", "delete-report"}
boundary = {"read-report", "write-report"}
org_denies = {"write-report"}
def decide(action):
if action in org_denies:
return "denied by organization policy"
if action not in identity:
return "no identity allow"
if action not in boundary:
return "outside boundary"
return "allowed"
for action in ["read-report", "write-report", "delete-report", "list-admins"]:
print(action, decide(action))
boundary.add("delete-report")
print("after boundary update:", decide("delete-report"))
print("write after update:", decide("write-report"))
Check the result
read-report allowed write-report denied by organization policy delete-report outside boundary list-admins no identity allow after boundary update: allowed write after update: denied by organization policy
Remove read-report from the identity set. The boundary alone cannot grant it. Restore the original and change only the SCP deny to predict the write decision. Real evaluation can also include resource policies, session policies, conditions and service-specific checks.
Related lesson · Delegate access within enforceable limits
Explain an IAM decision from the applicable policies quiz
Answer 3 questions. Check each answer for an explanation.
Worked example · Explain an IAM decision from the applicable policies