Courseiva
hardMultiple Choice

AIF-C01 Practice Question: A developer is using the Amazon Bedrock…

A developer is using the Amazon Bedrock InvokeModel API with a model that has a context window of 8,000 tokens. The developer sends a prompt that is 7,500 tokens long and expects a response of about 1,000 tokens. The API call fails with an error indicating the input exceeds the model's context window. Why did this happen?

⚠ Common exam trap

Many candidates assume the context window applies only to the input prompt, ignoring that the output response also consumes tokens from the same window, leading them to incorrectly select option D.

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 context window includes both input and output tokens, so the total of 7,500 + 1,000 = 8,500 exceeds the 8,000 limit

The context window of a foundation model includes both the input prompt and the generated output tokens. The developer's prompt of 7,500 tokens plus the expected 1,000-token response totals 8,500 tokens, which exceeds the model's 8,000-token limit. The InvokeModel API enforces this combined limit, so even though the prompt alone is under the limit, the total token count causes the error.

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 API automatically reserves 2,000 tokens for output, reducing available input capacity

    Why it's wrong here

    Bedrock does not automatically reserve a fixed 2,000-token output buffer; the failure arises because input plus requested output must fit the shared 8,000-token window. It is tempting because reserving output space is a real pattern in some APIs, and would be correct if the model documented such a fixed reservation.

  • ✗

    The model requires a minimum of 512 tokens for internal processing

    Why it's wrong here

    No universal 512-token internal processing reserve exists; the error stems from input and output sharing one 8,000-token context window. It is tempting because models do consume tokens for special or system tokens, and would be correct if the model's documentation specified a fixed internal overhead.

  • ✓

    The context window includes both input and output tokens, so the total of 7,500 + 1,000 = 8,500 exceeds the 8,000 limit

    Why this is correct

    The context window caps combined input and output tokens, not input alone. With 7,500 prompt tokens plus an expected 1,000 response tokens, the total of 8,500 exceeds the model's 8,000-token limit, so Bedrock rejects the request before generation begins.

  • ✗

    The model's context window counts only input tokens; output tokens are separate

    Why it's wrong here

    The context window is shared: input and generated output tokens both count against the same 8,000-token limit, so 7,500 plus 1,000 exceeds it. It is tempting because some pricing separates input and output tokens, and would be correct if the model billed or limited them independently.

About these practice questions

Courseiva writes every AIF-C01 question from scratch — 862 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.