Question 258 of 1,040
Design Secure ArchitecturesmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to add a condition using `sts:ExternalId` in the IAM role trust policy. This directly prevents confused deputy attacks by requiring the vendor to provide a unique, pre-agreed identifier in the `AssumeRole` API call, ensuring that the role is assumed only for the intended purpose and not tricked by a malicious third party. On the SAA-C03 exam, this scenario tests your understanding of cross-account role trust policies and the specific use of the `sts:ExternalId` condition key to mitigate the confused deputy problem—a common trap is confusing this with `aws:SourceArn` or `aws:SourceAccount`, which are used for service-to-service scenarios, not cross-account vendor access. A reliable memory tip is to think of the external ID as a secret handshake: the vendor must present the exact agreed ID to prove they are the legitimate partner, preventing an impostor from hijacking the trust relationship.

SAA-C03 Design Secure Architectures Practice Question

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.

A SaaS vendor will access your AWS resources by assuming an IAM role in your account. You want to prevent confused-deputy attacks and ensure the vendor can only assume the role using an agreed external identifier.

Your role trust policy currently allows sts:AssumeRole from the vendor’s principal, but it does not include any external ID protection. Which change is the best next step?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

Question 1mediummultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Add a condition to the trust policy: Condition = {"StringEquals": {"sts:ExternalId": "vendor-agreed-id"}}.

Option A is correct because the `sts:ExternalId` condition key is specifically designed to prevent confused-deputy problems. By adding `{"StringEquals": {"sts:ExternalId": "vendor-agreed-id"}}` to the trust policy, you ensure that the vendor must provide the agreed external ID in the `AssumeRole` API call, which only the legitimate vendor knows. This prevents a malicious third party from tricking the vendor into assuming a role in your account on their behalf.

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.

  • Add a condition to the trust policy: Condition = {"StringEquals": {"sts:ExternalId": "vendor-agreed-id"}}.

    Why this is correct

    Using sts:ExternalId in the trust policy ensures only assume-role requests presenting the correct external identifier are allowed. This directly mitigates confused-deputy attacks by binding authorization to a value the vendor must know. It also keeps the permissions model clean, because the check is enforced during the STS AssumeRole request.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Add a condition to the trust policy: Condition = {"IpAddress": {"aws:SourceIp": "203.0.113.0/24"}}.

    Why it's wrong here

    Source IP restrictions are brittle for vendors using dynamic egress addresses and do not directly address confused-deputy risk. The problem described is an authorization design gap around external identity. IP conditions can also block legitimate vendor traffic and complicate operations.

  • Remove sts:AssumeRole and replace it with sts:AssumeRoleWithWebIdentity to use the vendor’s browser-based tokens.

    Why it's wrong here

    AssumeRoleWithWebIdentity is not relevant to a service-to-service SaaS access pattern described. It also introduces additional complexity and reliance on OIDC tokens and providers. The key requirement here is external ID protection in AssumeRole trust, not switching STS APIs.

  • Add a condition to the role permissions policy (not the trust policy) requiring aws:PrincipalTag/ExternalId to equal the external identifier.

    Why it's wrong here

    Role permissions policies do not govern who can assume the role; the trust policy does. Also, PrincipalTag-based checks would require the tag to be supplied and mapped reliably. The most appropriate place for confused-deputy protection is the AssumeRole trust policy with sts:ExternalId.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse where to place the condition (trust policy vs. permissions policy) or mistakenly think IP-based restrictions or changing the API action are appropriate solutions for confused-deputy prevention.

Trap categories for this question

  • Similar concept trap

    Source IP restrictions are brittle for vendors using dynamic egress addresses and do not directly address confused-deputy risk. The problem described is an authorization design gap around external identity. IP conditions can also block legitimate vendor traffic and complicate operations.

Detailed technical explanation

How to think about this question

The `sts:ExternalId` condition key works by requiring the calling principal to pass an `ExternalId` parameter in the `AssumeRole` API request. This ID is a shared secret between you and the vendor, and AWS validates it against the trust policy condition before allowing the role assumption. Under the hood, the `AssumeRole` API call includes the `ExternalId` in the request body, and the IAM service checks it against the policy's `sts:ExternalId` condition; if missing or mismatched, the request is denied with an `AccessDenied` error. This mechanism is defined in the AWS Security Token Service documentation and is a best practice for cross-account access to mitigate the confused-deputy problem described in the IAM user guide.

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.

Related practice questions

Related SAA-C03 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SAA-C03 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SAA-C03 question test?

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: Add a condition to the trust policy: Condition = {"StringEquals": {"sts:ExternalId": "vendor-agreed-id"}}. — Option A is correct because the `sts:ExternalId` condition key is specifically designed to prevent confused-deputy problems. By adding `{"StringEquals": {"sts:ExternalId": "vendor-agreed-id"}}` to the trust policy, you ensure that the vendor must provide the agreed external ID in the `AssumeRole` API call, which only the legitimate vendor knows. This prevents a malicious third party from tricking the vendor into assuming a role in your account on their behalf.

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: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

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.