As of early 2026, AWS has a number of associated however separate elements that make up the agent and LLM abstractions.
- bedrock is a mannequin layer that enables entry to giant language fashions.
- bedrock agent Managed utility layer. In different phrases, AWS runs the agent based mostly in your necessities.
- Bedrock AgentCore is an infrastructure layer that permits AWS to run brokers developed utilizing third-party frameworks similar to CrewAI and LangGraph.
Along with these three providers, AWS has the next providers: strand, An open supply Python library for constructing brokers outdoors of Bedrock providers. You may then deploy to different AWS providers similar to ECS or Lambda.
All three agent-based providers have the time period “Bedrock” of their names, which may be complicated, however this text will give attention to the usual Bedrock service and clarify how and why you must use it. Describes customary Bedrock providers and reveals how and why you must use them.
Bedrock has been accessible as a service completely on AWS since early 2023. This could provide you with a clue as to why Bedrock was launched. Amazon clearly acknowledged the rise of large-scale language fashions and their impression on IT structure and system improvement processes. It was AWS meat and potatoes they usually have been eager that nobody was going to eat lunch.
AWS developed a number of LLMs of its personal, however realized that to stay aggressive it wanted to make top-of-the-line fashions, similar to these from Anthropic, accessible to customers. And that is the place Bedrock steps in. As they are saying of their web site blurb:
… Bedrock is a completely managed service that gives a number of high-performance foundational fashions (FM) from main AI corporations similar to AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon through a single API, offering the broad set of options wanted to construct generative AI functions, simplifying improvement whereas sustaining privateness and safety.
How do I entry Bedrock?
So, that is the idea behind Bedrock, however how do you entry it and really use it? Naturally, the very first thing you want is an AWS account. We assume you have already got it, however in the event you do not, click on the hyperlink under to set it up.
https://aws.amazon.com/account
Conveniently, once you join a brand new AWS account, most of the providers you utilize fall beneath AWS’s so-called “free tier,” so your prices are minimal. 1 yr After creating your account – assuming you don’t go loopy and begin launching an enormous compute server or one thing.
There are three primary methods to make use of AWS providers.
- By way of console. In case you are a newbie, that is in all probability the popular route as it’s the best to get began.
- By way of API. When you’re good at coding, you may entry all AWS providers via APIs. For instance, AWS provides Python programmers: Boto 3 library. Related libraries exist for different languages ​​similar to JavaScript.
- By way of the command line interface (CLI). The CLI is a further instrument that you may obtain from AWS that lets you work together with AWS providers straight out of your terminal.
Observe that the latter two strategies require login credentials to be configured in your native system.
What are you able to do with Bedrock?
Merely put, you are able to do a lot of the issues you are able to do with common chat fashions like OpenAI, Anthropic, and Google. Bedrock relies on quite a lot of foundational fashions that can be utilized collectively, together with:
- Kimi K2 pondering. deep inference mannequin
- Claude works 4.5. For a lot of, that is the very best LLM presently accessible.
- GPT-OSS. OpenAI’s Open Supply LLM
There are lots of others. For an entire listing please see the next hyperlink:
https://aws.amazon.com/bedrock/model-choice
Please inform me the best way to use Bedrock.
You employ Bedrock utilizing a mix of the AWS CLI and the Python API supplied by the boto3 library. Be sure you have the next setup as stipulations
- AWS account.
- The AWS CLI has been downloaded and put in in your system.
- Identification and Entry Administration (IAM) customers have applicable permissions and entry keys. This may be executed from the AWS console.
- I configured person credentials through AWS CLI like this. Usually, you have to to supply three items of data. All of those may be obtained within the earlier steps above. You’ll be requested to enter related info.
$ aws configure
AWS Entry Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Entry Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default area identify [None]: us-west-2
Default output format [None]:
Enable Bedrock to entry your mannequin
Beforehand (a number of months in the past!), you had to make use of the AWS Administration Console to request entry to a particular mannequin from Bedrock, however now entry is robotically granted the primary time you name the mannequin.
Please word that for Anthropic fashions, first-time customers could also be required to submit use case particulars earlier than accessing the mannequin. Additionally look out for entry to high fashions from Anthropic and different suppliers. intentionpricey Due to this fact, monitor your billing usually and take away mannequin entry once you not want it.
Nonetheless, you could know the mannequin identify to make use of. To get an inventory of all Bedrock suitable fashions, you should use the next AWS CLI command.
aws bedrock list-foundation-models
This returns a JSON outcome set itemizing numerous properties for every mannequin, similar to:
{
"modelSummaries": [
{
"modelArn": "arn:aws:bedrock:us-east-2::foundation-model/nvidia.nemotron-nano-12b-v2",
"modelId": "nvidia.nemotron-nano-12b-v2",
"modelName": "NVIDIA Nemotron Nano 12B v2 VL BF16",
"providerName": "NVIDIA",
"inputModalities": [
"TEXT",
"IMAGE"
],
"outputModalities": [
"TEXT"
],
"responseStreamingSupported": true,
"customizationsSupported": [],
"inferenceTypesSupported": [
"ON_DEMAND"
],
"modelLifecycle": {
"standing": "ACTIVE"
}
},
{
"modelArn": "arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-sonnet-4-20250514-v1:0",
...
...
...
Select the mannequin you need and give attention to it mannequin id We’ll want this later in our Python code, so we’ll get it from the JSON output. An vital caveat to that is that you just typically see statements like the next in mannequin descriptions:
...
...
"inferenceTypesSupported": [
"INFERENCE_PROFILE"
]
...
...
That is reserved for the next fashions:
- giant scale or in excessive demand
- Requires reserved or managed capability
- Requires express price and throughput controls
For these fashions, you are able to do extra than simply discuss with the mannequin ID in your code. as a substitute, Inference profile. An inference profile is a Bedrock useful resource that’s certain to a number of underlying LLMs and areas.
There are two methods to acquire an inference profile that you should use. The primary is to create it your self. These are known as utility profiles. The second technique is to make use of one in all AWS’s supported profiles. This can be a easier choice as a result of it’s pre-built and also you solely must retrieve the related profile ID related to the inference profile you need to use in your code.
When selecting the best way to create an utility profile, examine the suitable AWS documentation. Nonetheless, the pattern code makes use of supported profiles.
Verify the hyperlink under for an inventory of profiles supported by AWS.
In our first code instance, we need to use Claude’s Sonnet 3.5 V2 mannequin, so click on on the road above and you may see the next directions:
I made a word of the profile ID ( us.anthropic.claude-3–5-sonnet-20241022-v2:0 ) and one of many legitimate supply areas ( us-east-1 ).
The second two pattern code snippets use OpenAI’s open supply LLM for textual content output and AWS’ Titan Picture generator for pictures. None of those fashions require an inference profile, so you may simply use the common mannequin ID in your code.
Observe: Whichever mannequin you select, ensure the AWS Area is ready to the right worth for every.
Establishing the event atmosphere
Since you may be performing some coding, it is best to separate your atmosphere so it would not intrude with different initiatives. So let’s do it now. We’re utilizing Home windows and UV Package deal Supervisor, however be at liberty to make use of whichever instrument you are most snug with. My code runs in a Jupyter pocket book.
uv init bedrock_demo --python 3.13
cd bedrock_demo
uv add boto3 jupyter
# To run the pocket book, kind this in
uv run jupyter pocket book
Utilizing Bedrock from Python
Let’s have a look at Bedrock in motion with some examples. It begins out easy, however steadily will increase in complexity as you progress.
Instance 1: Easy questions and solutions utilizing inference profiles
This instance makes use of the Claude Sonnet 3.5 V2 mannequin described earlier. As talked about earlier, this mannequin is invoked utilizing the profile ID related to its inference profile.
import json
import boto3
brt = boto3.shopper("bedrock-runtime", region_name="us-east-1")
profile_id = "us.anthropic.claude-3-5-sonnet-20241022-v2:0"
physique = json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 200,
"temperature": 0.2,
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "What is the capital of France?"}
]
}
]
})
resp = brt.invoke_model(
modelId=profile_id,
physique=physique,
settle for="utility/json",
contentType="utility/json"
)
information = json.hundreds(resp["body"].learn())
# Claude responses come again as a "content material" array, not OpenAI "decisions"
print(information["content"][0]["text"])
#
# Output
#
The capital of France is Paris.
Observe that calling this mannequin (and comparable fashions) creates an implicit subscription between you and the AWS market. that is don’t have Recurring recurring charges. You’ll solely be charged if the mannequin is definitely used, however it’s best to observe this to keep away from sudden prices. You’ll obtain an e mail outlining your subscription settlement with hyperlinks to handle or cancel your present mannequin subscriptions.
Instance 2: Create a picture
Simple picture creation utilizing AWS’ personal Titan mannequin. This mannequin will not be related to an inference profile, so you may discuss with it utilizing modelID.
import json
import base64
import boto3
brt_img = boto3.shopper("bedrock-runtime", region_name="us-east-1")
model_id_img = "amazon.titan-image-generator-v2:0"
immediate = "A hippo driving a motorcycle."
physique = json.dumps({
"taskType": "TEXT_IMAGE",
"textToImageParams": {
"textual content": immediate
},
"imageGenerationConfig": {
"numberOfImages": 1,
"top": 1024,
"width": 1024,
"cfgScale": 7.0,
"seed": 0
}
})
resp = brt_img.invoke_model(
modelId=model_id_img,
physique=physique,
settle for="utility/json",
contentType="utility/json"
)
information = json.hundreds(resp["body"].learn())
# Titan returns base64-encoded pictures within the "pictures" array
img_b64 = information["images"][0]
img_bytes = base64.b64decode(img_b64)
out_path = "titan_output.png"
with open(out_path, "wb") as f:
f.write(img_bytes)
print("Saved:", out_path)
On my system the output picture seemed like this:

Instance 3: Technical help triage assistant utilizing OpenAI’s OSS mannequin
This can be a extra complicated and helpful instance. Right here, you may arrange an assistant that takes issues reported by non-technical customers and outputs further questions you need the person to reply, in addition to the probably reason for the issue and additional steps to take. As within the earlier instance, this mannequin will not be related to an inference profile.
import json
import re
import boto3
from pydantic import BaseModel, Discipline
from typing import Listing, Literal, Elective
# ----------------------------
# Bedrock setup
# ----------------------------
REGION = "us-east-2"
MODEL_ID = "openai.gpt-oss-120b-1:0"
brt = boto3.shopper("bedrock-runtime", region_name=REGION)
# ----------------------------
# Output schema
# ----------------------------
Severity = Literal["low", "medium", "high"]
Class = Literal["account", "billing", "device", "network", "software", "security", "other"]
class TriageResponse(BaseModel):
class: Class
severity: Severity
abstract: str = Discipline(description="One-sentence restatement of the issue.")
likely_causes: Listing[str] = Discipline(description="Prime believable causes, concise.")
clarifying_questions: Listing[str] = Discipline(description="Ask solely what is required to proceed.")
safe_next_steps: Listing[str] = Discipline(description="Step-by-step actions protected for a non-technical person.")
stop_and_escalate_if: Listing[str] = Discipline(description="Clear crimson flags that require an expert/helpdesk.")
recommended_escalation_target: Elective[str] = Discipline(
default=None,
description="If severity is excessive, who to contact (e.g., IT admin, financial institution, ISP)."
)
# ----------------------------
# Helpers
# ----------------------------
def invoke_chat(messages, max_tokens=800, temperature=0.2) -> dict:
physique = json.dumps({
"messages": messages,
"max_tokens": max_tokens,
"temperature": temperature
})
resp = brt.invoke_model(
modelId=MODEL_ID,
physique=physique,
settle for="utility/json",
contentType="utility/json"
)
return json.hundreds(resp["body"].learn())
def extract_content(information: dict) -> str:
return information["choices"][0]["message"]["content"]
def extract_json_object(textual content: str) -> dict:
"""
Extract the primary JSON object from mannequin output.
Handles frequent circumstances like <reasoning> blocks or further textual content.
"""
textual content = re.sub(r"<reasoning>.*?</reasoning>", "", textual content, flags=re.DOTALL).strip()
begin = textual content.discover("{")
if begin == -1:
increase ValueError("No JSON object discovered.")
depth = 0
for i in vary(begin, len(textual content)):
if textual content[i] == "{":
depth += 1
elif textual content[i] == "}":
depth -= 1
if depth == 0:
return json.hundreds(textual content[start:i+1])
increase ValueError("Unbalanced JSON braces; couldn't parse.")
# ----------------------------
# The helpful perform
# ----------------------------
def triage_issue(user_problem: str) -> TriageResponse:
messages = [
{
"role": "system",
"content": (
"You are a careful technical support triage assistant for non-technical users. "
"You must be conservative and safety-first. "
"Return ONLY valid JSON matching the given schema. No extra text."
)
},
{
"role": "user",
"content": f"""
User problem:
{user_problem}
Return JSON that matches this schema:
{TriageResponse.model_json_schema()}
""".strip()
}
]
uncooked = invoke_chat(messages)
textual content = extract_content(uncooked)
parsed = extract_json_object(textual content)
return TriageResponse.model_validate(parsed)
# ----------------------------
# Instance
# ----------------------------
if __name__ == "__main__":
drawback = "My laptop computer is related to Wi-Fi however web sites will not load, and Zoom retains saying unstable connection."
outcome = triage_issue(drawback)
print(outcome.model_dump_json(indent=2))
That is the output.
"class": "community",
"severity": "medium",
"abstract": "Laptop computer reveals Wi‑Fi connection however can not load web sites and Zoom
reviews an unstable connection.",
"likely_causes": [
"Router or modem malfunction",
"DNS resolution failure",
"Local Wi‑Fi interference or weak signal",
"IP address conflict on the network",
"Firewall or security software blocking traffic",
"ISP outage or throttling"
],
"clarifying_questions": [
"Are other devices on the same Wi‑Fi network able to access the internet?",
"Did the problem start after any recent changes (e.g., new software, OS update, VPN installation)?",
"Have you tried moving closer to the router or using a wired Ethernet connection?",
"Do you see any error codes or messages in the browser or Zoom besides "unstable connection"?"
],
"safe_next_steps": [
"Restart the router and modem by unplugging them for 30 seconds, then power them back on.",
"On the laptop, forget the Wi‑Fi network, then reconnect and re-enter the password.",
"Run the built‑in Windows network troubleshooter (Settings → Network & Internet → Status → Network troubleshooter).",
"Disable any VPN or proxy temporarily and test the connection again.",
"Open a command prompt and run `ipconfig /release` followed by `ipconfig /renew`.",
"Flush the DNS cache with `ipconfig /flushdns`.",
"Try accessing a simple website (e.g., http://example.com) and note if it loads.",
"If possible, connect the laptop to the router via Ethernet to see if the issue persists."
],
"stop_and_escalate_if": [
"The laptop still cannot reach any website after completing all steps.",
"Other devices on the same network also cannot access the internet.",
"You receive error messages indicating hardware failure (e.g., Wi‑Fi adapter not found).",
"The router repeatedly restarts or shows error lights.",
"Zoom continues to report a poor or unstable connection despite a working internet test."
],
"recommended_escalation_target": "IT admin"
}
abstract
This text launched AWS Bedrock, AWS’s managed gateway for constructing language fashions at scale. Clarify why it exists and the way it matches right into a broader language mannequin. AWS AI Stack and the best way to use it in apply. We coated mannequin discovery, area and credential setup, and the vital variations between on-demand fashions and fashions that require inference profiles, a standard supply of confusion for builders.
Via a hands-on Python instance, we demonstrated textual content and picture technology utilizing each customary on-demand fashions and fashions that require an inference profile.
At its core, Bedrock displays AWS’ long-standing philosophy of abstracting infrastructure complexity with out eliminating management. Reasonably than selling a single “finest” mannequin, Bedrock treats foundational fashions as managed infrastructure elements which are replaceable, manageable, and region-aware. This implies a future the place Bedrock evolves much less as a chat interface and extra as a mannequin orchestration layer tightly built-in with IAM, networking, price administration, and agent frameworks.
Over time, we’d anticipate Bedrock to maneuver additional in direction of standardized inference contracts (subscriptions) and a clearer separation of experimentation and manufacturing capabilities. And with the Agent and AgentCore providers, we’re already enabling deeper integration between agent workflows and Bedrock, positioning fashions as sturdy constructing blocks inside AWS techniques reasonably than as merchandise themselves.
For the avoidance of doubt, I’ve no connection or relationship with Amazon Net Providers aside from being a person of Amazon Net Providers.

