Question 376 of 500
Applications of Foundation ModelshardMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the agent role lacks the required IAM permissions to invoke the knowledge base. This is because an Amazon Bedrock agent must have an IAM policy explicitly granting the `bedrock:Retrieve` and `bedrock:RetrieveAndGenerate` actions on the specific knowledge base resource; without these permissions, the agent cannot query the knowledge base even if the CloudFormation stack deploys correctly and the KnowledgeBaseId is valid. On the AWS Certified AI Practitioner AIF-C01 exam, this scenario tests your understanding of how IAM roles govern agent-to-knowledge-base communication, and a common trap is assuming that a correctly configured CloudFormation template automatically grants all necessary permissions—it does not, as the agent role’s policy must be explicitly attached. Remember the memory tip: “Retrieve and RetrieveAndGenerate are the keys to the knowledge base gate.”

AIF-C01 Applications of Foundation Models Practice Question

This AIF-C01 practice question tests your understanding of applications of foundation models. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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.

Exhibit

Resources:
  BedrockAgent:
    Type: AWS::Bedrock::Agent
    Properties:
      AgentName: MyAgent
      FoundationModel: anthropic.claude-v2
      Instruction: "You are a helpful assistant."
      KnowledgeBases:
        - KnowledgeBaseId: !Ref MyKnowledgeBase
      PromptOverrideConfiguration: null
  MyKnowledgeBase:
    Type: AWS::Bedrock::KnowledgeBase
    Properties:
      Name: MyKB
      RoleArn: !GetAtt KBRole.Arn
      KnowledgeBaseConfiguration:
        Type: VECTOR
        VectorKnowledgeBaseConfiguration:
          EmbeddingModelArn: !Sub arn:aws:bedrock:${AWS::Region}::foundation-model/amazon.titan-embed-text-v1
      StorageConfiguration:
        Type: OPENSEARCH_SERVERLESS
        OpensearchServerlessConfiguration:
          CollectionArn: !GetAtt MyCollection.Arn
          VectorIndexName: my-index
  MyCollection:
    Type: AWS::OpenSearchServerless::Collection
    Properties:
      Name: my-collection
      Type: VECTORSEARCH

Refer to the exhibit. A developer deploys this CloudFormation stack but the agent fails to query the knowledge base. What is a likely cause?

Question 1hardmultiple choice
Full question →

Exhibit

Resources:
  BedrockAgent:
    Type: AWS::Bedrock::Agent
    Properties:
      AgentName: MyAgent
      FoundationModel: anthropic.claude-v2
      Instruction: "You are a helpful assistant."
      KnowledgeBases:
        - KnowledgeBaseId: !Ref MyKnowledgeBase
      PromptOverrideConfiguration: null
  MyKnowledgeBase:
    Type: AWS::Bedrock::KnowledgeBase
    Properties:
      Name: MyKB
      RoleArn: !GetAtt KBRole.Arn
      KnowledgeBaseConfiguration:
        Type: VECTOR
        VectorKnowledgeBaseConfiguration:
          EmbeddingModelArn: !Sub arn:aws:bedrock:${AWS::Region}::foundation-model/amazon.titan-embed-text-v1
      StorageConfiguration:
        Type: OPENSEARCH_SERVERLESS
        OpensearchServerlessConfiguration:
          CollectionArn: !GetAtt MyCollection.Arn
          VectorIndexName: my-index
  MyCollection:
    Type: AWS::OpenSearchServerless::Collection
    Properties:
      Name: my-collection
      Type: VECTORSEARCH

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

The agent role does not have permissions to invoke the knowledge base

The correct answer is B because the agent role must have an IAM policy that grants the `bedrock:Retrieve` and `bedrock:RetrieveAndGenerate` permissions on the knowledge base. Without these permissions, the agent cannot invoke the knowledge base, even if the KnowledgeBaseId is correctly passed and the embedding model is available.

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.

  • The KnowledgeBaseId is not passed correctly

    Why it's wrong here

    KnowledgeBaseId uses !Ref, which is correct.

  • The agent role does not have permissions to invoke the knowledge base

    Why this is correct

    The agent's IAM role must have bedrock:InvokeKnowledgeBase permission.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The embedding model is not available in the region

    Why it's wrong here

    The embedding model arn is region-specific and assigned via Sub.

  • The OpenSearch collection type should be SEARCH not VECTORSEARCH

    Why it's wrong here

    VECTORSEARCH is correct for vector storage.

Common exam traps

Common exam trap: answer the scenario, not the keyword

AWS often tests the distinction between resource creation permissions and runtime invocation permissions, trapping candidates who assume that a successful stack deployment implies all runtime permissions are correctly configured.

Detailed technical explanation

How to think about this question

Under the hood, the agent uses the `InvokeAgent` API, which internally calls `RetrieveAndGenerate` on the knowledge base. The IAM role attached to the agent must include a policy with `bedrock:Retrieve` and `bedrock:RetrieveAndGenerate` actions, and the resource ARN must point to the specific knowledge base. A common subtlety is that the agent role also needs `bedrock:InvokeModel` for the embedding model used during retrieval, but the primary failure is the missing knowledge base invoke permissions.

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 AIF-C01 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 AIF-C01 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 AIF-C01 question test?

Applications of Foundation Models — This question tests Applications of Foundation Models — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The agent role does not have permissions to invoke the knowledge base — The correct answer is B because the agent role must have an IAM policy that grants the `bedrock:Retrieve` and `bedrock:RetrieveAndGenerate` permissions on the knowledge base. Without these permissions, the agent cannot invoke the knowledge base, even if the KnowledgeBaseId is correctly passed and the embedding model is available.

What should I do if I get this AIF-C01 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

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

Keep practising

More AIF-C01 practice questions

Last reviewed: Jun 30, 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 AIF-C01 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 AIF-C01 exam.