Token Pricing and Context Engineering
Token-based pricing (verified, Amazon Bedrock pricing page)
- On-demand FM use is billed per input token and per output token (prices quoted per million tokens). Output tokens usually cost more than input tokens.
- Batch inference: about 50% lower than on-demand for supported models.
- Service tiers: Standard (baseline), Flex (50% discount, for work that can wait), Priority (75% premium, for latency-critical work), and Reserved / Provisioned Throughput (hourly, by model units).
- Prompt caching reduces latency and input token cost for long, repeated context (Bedrock prompt caching docs).
Effect on cost and performance (design guidance)
| Lever | Cost | Performance |
|---|---|---|
| Longer prompts (more context, examples) | Up | Often better answers, slower |
| Longer outputs | Up (output tokens) | Slower |
| Smaller model | Down | Faster; may be less capable |
| Prompt caching for repeated context | Down | Faster |
| Batch for non-urgent work | Down ~50% | Not interactive |
Context engineering (objective 2.1.5)
Context engineering means deciding what goes into the model's context window for each call: instructions, retrieved documents, conversation history, tool results and examples. The model only knows what is in its context (plus its training).
Good practice (design guidance): - Include only relevant information; retrieval (RAG) beats pasting everything. - Summarise or trim long histories. - Put stable content (instructions, reference docs) first so it can be cached. - Give agents memory (e.g. AgentCore Memory) instead of replaying every past turn.
Exam traps
- Ignoring output tokens when estimating cost.
- Stuffing the whole document set into every prompt instead of retrieving the relevant chunks.
- Using Priority tier for overnight reports. Batch or Flex are cheaper.
References
- Amazon Bedrock pricing — checked Oct 19, 2026
- Bedrock prompt caching — checked Oct 19, 2026
Check your understanding
Two ways to cut token cost without changing the model?Show answerHide answer
Answer
Prompt caching; trimming context or retrieving only relevant chunks (also batch for non-urgent work).What is context engineering?Show answerHide answer
Answer
Choosing and arranging what information goes into each model call.Which Bedrock tier suits work that can wait, at half price?Show answerHide answer
Answer
Flex (or batch inference).