Restrict Cross-Account Role Assumption — Specific Principal ARN and ExternalId | AWS SAA Explained
This SAA-C03 practice question tests your understanding of design secure architectures. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Based on the exhibit, a workload in Account B must assume a role in Account A. Security requires that only the specific role arn:aws:iam::444455556666:role/PipelineExecRole can assume it, and only when the caller supplies the external ID acct-b-prod-7788. Which change best satisfies the requirement with the least privilege?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "least"
Why it matters: You want the option with minimum overhead, fewest steps, or lowest impact — not the most feature-rich or comprehensive answer.
Keep the root principal and add an aws:PrincipalTag condition in the trust policy to require the tag acct-b-prod-7788.
Why wrong: Principal tags can help with authorization, but they do not ensure that only one exact role in Account B can call STS. Any principal that can supply the tag might still satisfy the condition. This does not provide the required caller-specific trust boundary.
B
Replace the principal with arn:aws:iam::444455556666:role/PipelineExecRole and add a StringEquals condition on sts:ExternalId = acct-b-prod-7788.
This change directly restricts trust to one named role in Account B and adds a confused-deputy defense with the external ID. The role trust policy is the correct place to control who can assume the role, and the external ID ensures only the expected caller can complete the STS request.
C
Attach a permission boundary to the role in Account A so that only PipelineExecRole can use it.
Why wrong: Permission boundaries limit the maximum permissions a role can have after it is assumed, but they do not control who is trusted to assume the role. The trust policy, not the permission boundary, determines which external principal can call sts:AssumeRole.
D
Add an SCP in Account B that allows sts:AssumeRole only for PipelineExecRole.
Why wrong: An SCP can constrain identities in Account B, but it cannot by itself grant trust on the role in Account A. The trust policy in Account A must still explicitly allow the correct principal and should include the external ID condition for secure cross-account access.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Replace the principal with arn:aws:iam::444455556666:role/PipelineExecRole and add a StringEquals condition on sts:ExternalId = acct-b-prod-7788.
Option B is correct because it explicitly restricts the trust policy principal to the specific IAM role ARN `arn:aws:iam::444455556666:role/PipelineExecRole` and adds a `StringEquals` condition on `sts:ExternalId` set to `acct-b-prod-7788`. This satisfies the security requirement by ensuring only that exact role can assume the role in Account A, and only when the correct external ID is provided, following the principle of least privilege.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
Keep the root principal and add an aws:PrincipalTag condition in the trust policy to require the tag acct-b-prod-7788.
Why it's wrong here
Principal tags can help with authorization, but they do not ensure that only one exact role in Account B can call STS. Any principal that can supply the tag might still satisfy the condition. This does not provide the required caller-specific trust boundary.
✓
Replace the principal with arn:aws:iam::444455556666:role/PipelineExecRole and add a StringEquals condition on sts:ExternalId = acct-b-prod-7788.
Why this is correct
This change directly restricts trust to one named role in Account B and adds a confused-deputy defense with the external ID. The role trust policy is the correct place to control who can assume the role, and the external ID ensures only the expected caller can complete the STS request.
Clue confirmation
The clue word "least" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
Attach a permission boundary to the role in Account A so that only PipelineExecRole can use it.
Why it's wrong here
Permission boundaries limit the maximum permissions a role can have after it is assumed, but they do not control who is trusted to assume the role. The trust policy, not the permission boundary, determines which external principal can call sts:AssumeRole.
✗
Add an SCP in Account B that allows sts:AssumeRole only for PipelineExecRole.
Why it's wrong here
An SCP can constrain identities in Account B, but it cannot by itself grant trust on the role in Account A. The trust policy in Account A must still explicitly allow the correct principal and should include the external ID condition for secure cross-account access.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often confuse the trust policy's `Principal` element with permission boundaries or SCPs, mistakenly thinking those can restrict who can assume a role, when in fact only the trust policy controls the assumption, and the external ID condition is required to prevent confused deputy attacks.
Detailed technical explanation
How to think about this question
The `sts:ExternalId` condition is a critical security measure for cross-account role assumption, especially when the trusting account (Account A) needs to verify the purpose of the request from a third party (Account B). Under the hood, AWS evaluates the trust policy's `Principal` element first to determine if the caller is allowed, then checks all conditions, including `sts:ExternalId`, which must match exactly and is case-sensitive. In real-world scenarios, this prevents the confused deputy problem where an attacker in Account B could trick Account A into granting access by reusing a role ARN without the intended context.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Design Secure Architectures — This question tests Design Secure Architectures — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Replace the principal with arn:aws:iam::444455556666:role/PipelineExecRole and add a StringEquals condition on sts:ExternalId = acct-b-prod-7788. — Option B is correct because it explicitly restricts the trust policy principal to the specific IAM role ARN `arn:aws:iam::444455556666:role/PipelineExecRole` and adds a `StringEquals` condition on `sts:ExternalId` set to `acct-b-prod-7788`. This satisfies the security requirement by ensuring only that exact role can assume the role in Account A, and only when the correct external ID is provided, following the principle of least privilege.
What should I do if I get this SAA-C03 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "least". You want the option with minimum overhead, fewest steps, or lowest impact — not the most feature-rich or comprehensive answer.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A SaaS vendor’s automation account in Account B needs to assume a role in a customer account in Account A to read a specific S3 bucket and publish a deployment status file. The customer is worried about confused deputy attacks because multiple customers use the same vendor software. Which trust-policy design best meets the requirement?
hard
A.Allow the Account B root principal to assume the role if the caller knows the role ARN.
✓ B.Allow only the vendor’s specific IAM principal to assume the role and require a unique sts:ExternalId condition.
C.Attach a permissions boundary to the role so that the vendor cannot exceed the approved permissions.
D.Require MFA for the role assumption because it ensures only the vendor’s production automation can use the role.
Why B: Option B is correct because the `sts:ExternalId` condition is specifically designed to prevent the confused deputy problem in cross-account role assumptions. By requiring a unique external ID that only the customer knows, the customer ensures that the vendor's automation can only assume the role when acting on behalf of that specific customer, even if multiple customers use the same vendor software.
Variation 2. A software vendor in Account B must assume a role in Account A to process support tickets. Security wants to prevent confused deputy attacks. Which two configurations are required for this access pattern to work safely? Select two.
medium
✓ A.Require a specific sts:ExternalId value in the role trust policy in Account A.
✓ B.Make sure the vendor includes that same ExternalId when calling sts:AssumeRole.
C.Share long-term access keys from Account A with the vendor.
D.Attach a permissions boundary to the role to satisfy the ExternalId requirement.
E.Allow sts:GetSessionToken instead of sts:AssumeRole in the trust policy.
Why A: Option A is correct because requiring a specific sts:ExternalId value in the role trust policy in Account A is a standard AWS mechanism to prevent the confused deputy problem. The ExternalId acts as a unique secret that the vendor must provide when assuming the role, ensuring that the role is assumed only for the intended purpose and not by a malicious third party.
Variation 3. Account A has an IAM role named FinanceDataRole that is assumed by a principal in Account B. The role’s trust policy includes a condition requiring sts:ExternalId to equal "Fin-2026-Q2". A developer in Account B calls AssumeRole but receives an error: AccessDenied: ExternalId mismatch. The security team requires that you do not remove the ExternalId condition. What is the correct remediation?
medium
A.Add kms:Decrypt to the developer’s IAM policy so KMS can validate the ExternalId during AssumeRole.
✓ B.Update the AssumeRole call in Account B to include sts:ExternalId="Fin-2026-Q2" exactly as required.
C.Increase the role’s MaxSessionDuration to reduce authentication failures.
D.Remove the ExternalId condition from the trust policy to allow all AssumeRole requests.
Why B: The error 'AccessDenied: ExternalId mismatch' occurs because the AssumeRole API call from Account B does not include the required sts:ExternalId parameter. The trust policy on the FinanceDataRole explicitly requires this parameter to match 'Fin-2026-Q2' as a security measure to prevent the confused deputy problem. Option B is correct because the developer must pass the exact ExternalId value in the AssumeRole request to satisfy the condition and successfully assume the role.
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SAA-C03 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAA-C03 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.