hardMultiple ChoiceObjective-mapped
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
There is no automatic reservation; the total must fit within the window.
- ✗
The model requires a minimum of 512 tokens for internal processing
Why it's wrong here
No such minimum is required.
- ✓
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 developer must reduce input length or request a shorter output to fit within the limit.
- ✗
The model's context window counts only input tokens; output tokens are separate
Why it's wrong here
Context window includes both input and output tokens.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AIF-C01 question from scratch — 619 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 →
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.