INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: Multi-account guardrails and deployment checks

AWS STS AssumeRole across accounts: trust, authorization and session scope

A successful role assumption does not establish permission for the business operation. Evaluate a cross-account read in three separate stages.

What you will learn

Evaluate a cross-account read in three separate stages.

Prerequisite

The exercise uses fictional roles and contains no real credentials or tokens.

Separate role assumption from the operation itself

Cross-account AssumeRole needs caller authorization and trust in the target role. A successful request creates a temporary session.

The caller, target and resulting session
The caller, target and resulting session1: Caller — Ask for the role — Role assumption. 2: Role assumption — Check both sides — Session. 3: Session — Verify the operation — Business operation123CallerRole assumptionSessionBusiness operationThe caller, target and resulting session1: Caller — Ask for the role — Role assumption. 2: Role assumption — Check both sides — Session. 3: Session — Verify the operation — Business operation123CallerRole assumptionSessionBusinessoperation
  1. Caller → Role assumptionAsk for the role
  2. Role assumption → SessionCheck both sides
  3. Session → Business operationVerify the operation
Caller
Reporting service
Role assumption
Caller authorization and trust
Session
Scope restricted to reads
Business operation
Read the intended report

Compare attempts to use the same role

A fictional service reads audit reports. Unspecified conditions are assumed to be satisfied.
AttemptObservationNext check
Caller lacks AssumeRole grantRole assumption failsCheck caller authorization
Caller excluded from target trustRole assumption failsCheck target trust
Assumption and permitted readReport is readableRecord the session and scope
Assumption succeeds; session excludes writeWrite deniedCheck post-assumption permissions

A session policy can restrict a role’s permissions. It cannot grant actions beyond those allowed by the role’s policy.

Match the evidence to the failing stage

Identify the failure stage. Separate a denied AssumeRole request from an operation such as an S3 request returning a denial after assumption.

Define the minimum scope. Choose required operations, resources and lifetime for the target session.

Keep credentials out of the record. Record roles, operation names, timestamps and results without copying secret values.

Check the worked example

Choose an option to see the result and explanation.

Assumption succeeded but the report cannot be updated. What do you inspect?
Read the answer and reason

Answer: Check the session and target operation · The denial occurs after role assumption.

Can a session policy grant actions outside the role’s permissions?
Read the answer and reason

Answer: No additional actions beyond the role · A session policy cannot increase the role permissions.

The caller has a grant but the target does not trust it. What happens?
Read the answer and reason

Answer: Role assumption fails · Other-account role assumption requires target trust.

Check, then explain in your own words

  1. Identify the caller and requested role.
  2. Check whether role assumption succeeded.
  3. Verify permissions for the business operation separately.
Check your understanding: Does AssumeRole success prove that deployment or an audit export succeeded?

Verify the required operation under the resulting session.

Role assumption establishes a prerequisite.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.