Skip to main content
This lesson demonstrates how to explore models in the Amazon Bedrock console Playground and how to call Bedrock programmatically from Python using the AWS SDK (boto3). Follow the console walkthrough to pick models and experiment interactively, then reuse the same model choices in your application code.

Explore models in the Bedrock console

Open the AWS Management Console and navigate to Bedrock (type Bedrock in the search bar or find it under Recently visited). From the Bedrock console you can inspect available models for your region using the Model catalog. Tip: Select the AWS Region closest to your workload (for example, us-east-1 / N. Virginia, Seoul, Mumbai, or São Paulo) using the region selector in the console. Model availability varies by region. Under Test → Playground you can open the interactive Playground. The UI prompts you to select a model; here we choose a foundation model available in this region (for the demo we use Amazon’s Nova Micro on-demand).
A screenshot of the Amazon Bedrock "Select model" dialog in the AWS console showing a list of model providers and models (e.g., Titan Image Generator, Nova) with input/output options. A large mouse cursor is hovering over the model list.
After selecting a model, click Apply to open the Playground. The Playground provides:
  • Chat (multi-turn conversations)
  • Single prompt (one-shot requests)
  • Compare mode (send the same prompt to multiple models and view outputs side-by-side)
Run a quick prompt, for example: “Explain the difference between the Bedrock Runtime API and the Bedrock API.” The Playground returns the generated response along with token counts and latency, which helps you evaluate models before integrating them into code. You can also jump from a Model Catalog entry directly into the Playground. If you inspect Anthropic’s Claude Sonnet 4.5 and it fits your needs (modalities, languages, token limits), use the “Open in Playground” link to launch the Playground pre-selected with that model.
A screenshot of the Amazon Bedrock web console showing the Model catalog page for Anthropic's "Claude Sonnet 4.5" with a details table listing categories, input/output modalities, max input, and supported languages. The left sidebar navigation (Discover, Labs, Test, Infer, Tune) is visible and a large cursor arrow points at the details.

Call Bedrock from Python (boto3)

Once you’ve selected models in the console, switch to your code editor and call Bedrock from your application. The example below uses the Bedrock Runtime client and the chat-friendly converse method with a unified messages structure. Replace region_name and model_id with values appropriate for your account and chosen model.
Best practices shown in the example:
  • Use a structured prompt (context, role, instruction, output format) for consistent, high-quality outputs.
  • Use the unified messages format when available to maintain portability between chat-enabled models.
  • Use descriptive variable names (for example, inference_client) to make code more readable.
  • Replace model_id and region_name with the correct values for your account and region.
Important: SDK method names and response shapes can vary with SDK versions and model providers. Some examples use method names like invoke_model or other variants. If you encounter a different method or response format, consult the relevant documentation for exact API signatures.
When choosing a region, select the region closest to your workload and ensure the models you need are available there. Also confirm your AWS credentials are configured and that the IAM principal has permission to call Bedrock APIs.

Quick reference: when to use which API style

Summary

  • Use the Bedrock Model Catalog and Playground to discover models and run quick experiments (single prompt, multi-turn chat, or compare mode).
  • Structure prompts with clear context, role, instruction, and output format to improve results and iteration speed.
  • Call Bedrock from Python using the AWS SDK (boto3); prefer the unified messages format with converse for chat-style interactions.
  • Always verify region/model availability and check SDK/model documentation for exact method names and response structures.
That concludes this demonstration. Try the Bedrock Playground and the API calls hands-on to validate your prompts and chosen models.

Watch Video