Module 02 Amazon Bedrock Essentials - akash-coded/aws-bedrock-agentcore-strands GitHub Wiki

๐Ÿชจ Module 02 ยท Amazon Bedrock Essentials

Your first real calls: Converse API, tokens, tool use, knowledge bases, guardrails.

Module 02 of 16 ยท track Invoke ยท Estimated time: 6โ€“8 hours ยท Prerequisites: Modules 00โ€“01, and an AWS account with Bedrock model access enabled.

This is where AWS enters properly. One API โ€” Converse โ€” carries you from a hello-world call all the way to tool use and retrieval. Learn it well here and every later module gets easier.

Open the module on GitHub โ†—: the slides, notebooks, exercises and solutions are there. This page is the reading order, with the tutorial and the workbench alongside.

Read first, on the site

The lesson that frames this module is Why Your AI Agent Costs 4ร— the Estimate, and How to Fix It (7 min): what a token actually costs once the habits are counted. Then try the bill leak calculator in the workbench: the same decision, with your numbers.

What you will be able to do

  • Invoke any Bedrock model through the Converse API and read the token accounting
  • Hold a correct multi-turn conversation, including the assistant tool-use turn
  • Define a tool schema the model actually calls correctly
  • Query a Bedrock Knowledge Base and ground an answer in retrieved context
  • Apply a Guardrail and observe what it blocks

Concepts in this module

Portable GenAI concepts AWS-specific surface
Prompting Amazon Bedrock Converse API
Multi-turn state InvokeModel
Tool/function calling Bedrock Knowledge Bases
Retrieval grounding Bedrock Guardrails
Safety filtering IAM for Bedrock

Portable concepts transfer to any stack. The AWS column is where this module touches the cloud โ€” see docs/concepts/portability-matrix.md.

Run it in this order

# Step What it is
1 ๐Ÿ“– slides/Bedrock_Chapters_1_to_4.pptx Chapters 1โ€“4: access, models, first calls, tokens
2 ๐Ÿ’ป notebooks/00_Bedrock_Onboarding.ipynb Onboarding notebook โ€” verify your access works
3 โœ๏ธ exercises/Exercise_1_First_Calls_and_the_Converse_API.pdf Exercise 1 ยท first calls
4 ๐Ÿ’ป notebooks/converse_api_masterclass.ipynb Converse API masterclass
5 โœ๏ธ exercises/Exercise_2_Tokens_and_Multi-Turn_Conversations.pdf Exercise 2 ยท tokens and multi-turn
6 ๐Ÿ“– slides/Bedrock_Chapters_5_to_8.pptx Chapters 5โ€“8: tool use, RAG, guardrails, agents
7 ๐Ÿ’ป notebooks/travelmind_refund_agent.ipynb TravelMind refund agent โ€” tool use in anger
8 โœ๏ธ exercises/Exercise_3_Tool_Use_and_Knowledge_Bases.pdf Exercise 3 ยท tool use and KBs
9 โœ๏ธ exercises/Exercise_4_Guardrails_Strands_and_End-to-End_Agent_Design.pdf Exercise 4 ยท guardrails and end-to-end design
10 ๐Ÿ’ป notebooks/Day5_Bedrock_Build.ipynb Build session โ€” put it together

๐Ÿ“– read   ๐Ÿ’ป run   โœ๏ธ practise   ๐Ÿ“Š workbook   ๐Ÿ”– reference

Worked solutions live in solutions/. Attempt every exercise closed-book first โ€” the solutions are written to be read after you have a wrong answer to compare against.

Project artefact

projects/bedrock-mini-project โ€” a self-contained build with scripts, KB documents and a cost analysis.

Common mistakes

  • Using bedrock when you need bedrock-runtime. Different clients, different operations.
  • Dropping the assistant's tool-use message from history. The next turn then makes no sense to the model.
  • Assuming model access is on by default. It is per-model, per-region, and must be requested.

When it breaks

Every error anyone has hit in this course is in the Error Index, by the exact string. Model access and region problems are in Model and Region Notes. If it is a question rather than an error, check the answered ones first, then ask in Q&A.

Field guide for this module

Frameworks

Quick reference

Recipes and procedures


โ† Module 01 ยท LLM Intuition and the AWS Bridge ยท All modules ยท Module 03 ยท Amazon Bedrock Agents โ†’

โœ๏ธ This page is generated from modules/02-bedrock-essentials/README.md. To change it, edit the module README: an edit made here is replaced at the next sync.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ