Domain 3 of 4 · Chapter 1 of 3

Manage deployment infrastructure for ML and AI models

Four inference options: how does the caller wait?

For example, suppose a checkout cannot complete until a fraud score comes back, while a marketing team wants churn scores for every customer by morning; both need predictions, but their response-time and workload requirements differ, and AWS matches them to different options: Real-Time Inference suits millisecond latency requirements, and Batch Transform suits offline predictions on large batches of data available up front[1]. Matching each requirement to the mechanism that meets it is the AWS MLA-C02 exam guide skill 'Select model inference strategies (for example, real-time and batch processing)'[2] of Task 3.1, Manage deployment infrastructure for ML and AI model types, whose other skills include shared endpoints, models built outside of AWS, foundation models, agents and retrieval-augmented generation. For Task 3.2 (provisioning and configuring resources) and Task 3.3 (orchestration and CI/CD pipelines) of the same domain, see Provision and configure ML and AI workload resources and Automate ML and AI delivery pipelines.

The four options

Amazon SageMaker AI provides four options to deploy a trained model for predictions[1]. The first question is whether each prediction answers an individual request at all:

Cold starts: the price of on-demand idle savings

A cold start is the delay when a serverless endpoint that has been idle, or whose concurrent requests exceed its current usage, must spin up compute before it can process requests[4]; its length depends on model size, model download time and container start-up time. Accepting that delay is what buys the saving: with on-demand Serverless Inference you pay for the duration of running the inference code and the amount of data processed, not for idle periods[1]. Provisioned Concurrency keeps a set amount of serverless capacity warm for predictable bursts.

What Serverless Inference does not support

Serverless Inference is not a drop-in replacement for a real-time endpoint. Its feature exclusions[4] are GPUs, AWS Marketplace model packages, private Docker registries, multi-model endpoints, VPC configuration, network isolation, data capture (recording endpoint requests and responses to Amazon S3), multiple production variants (several model versions behind one endpoint, each with its own instances), Amazon SageMaker Model Monitor and inference pipelines. If a scenario needs any one of them, for example a GPU-backed model or captured traffic for monitoring, Serverless Inference is ruled out even when traffic is bursty. Provisioned Concurrency does not lift these exclusions; it only keeps serverless compute initialized. The conversion is also one-way: you cannot update a real-time endpoint to serverless, and a serverless endpoint converted to real-time cannot be rolled back to serverless[4].

The selection follows the caller. An offline dataset available up front suits batch transform; individually queued requests whose results are collected later suit Asynchronous Inference; a caller waiting on the response can use real-time inference, or Serverless Inference when traffic is intermittent, cold starts are acceptable and none of the excluded features is required. Check payload and processing-time limits as well. The comparison table The four SageMaker AI inference options and the decision tree at the end of this page lay out the same choice[1].

Asynchronous Inference: requests and results in Amazon S3

This section follows one asynchronous request from submission to result, because its path through Amazon S3 is what separates Asynchronous Inference from the two synchronous options in the previous section.

You create an asynchronous endpoint the same way as a real-time one, adding an AsyncInferenceConfig object to the endpoint configuration[5]. The request path[5] then runs in five steps:

  1. The client uploads the request payload to Amazon S3.
  2. The client calls InvokeEndpointAsync, passing a pointer to that S3 object rather than the payload itself.
  3. SageMaker AI queues the request and immediately returns an identifier and the output location.
  4. When an instance processes the request, SageMaker AI writes the result to the S3 output location.
  5. Optionally, Amazon SNS sends a success or error notification, so the application does not have to poll the output location.

The figure below follows the request from submission to notification. Two endpoint properties matter here. First, an endpoint configuration that contains AsyncInferenceConfig means the endpoint can only receive asynchronous invocations[5], so an application that also needs synchronous answers needs a separate endpoint. Second, the instance count can scale down to zero; requests received while there are zero instances are queued for processing once the endpoint scales up[1].

Serverless Inference can also sit at zero instances, so the two are easy to confuse. A serverless endpoint still returns each prediction in the HTTP response and accepts at most 4 MB per request, while an asynchronous endpoint never returns the prediction in the response and accepts payloads up to 1 GB. Intermittent traffic alone therefore points to Serverless Inference; a requirement to submit large inputs and collect results later points to Asynchronous Inference.

Client applicationkeeps the request IDAmazon S3input payloadRequest queuerequest waits hereInstanceruns the modelAmazon S3output locationAmazon SNSsuccess or error topic1 upload payload2 InvokeEndpointAsync3 ID + output locationpayload fetched4 processwrite result5 notify (optional)success or error notification
Asynchronous Inference request path on SageMaker AI: payload in, request queued, result written to the S3 output location, optional SNS notification.

Sharing one endpoint among several models

Hosting each model on its own endpoint can leave a company paying for mostly idle instances when each customer model receives infrequent traffic. SageMaker AI offers four ways for models to share an endpoint's instances, and they differ in how a request reaches a model:

Topology How a request reaches a model Fits when
Multi-model endpoint (MME) The request names a model with TargetModel; SageMaker AI loads it into the shared container if needed Many models on the same ML framework, with a mix of frequent and infrequent traffic
Multi-container endpoint with direct invocation The request names one container with TargetContainerHostname; only that container runs A set of independent models, possibly on different frameworks, kept in memory
Inference pipeline The request enters the first container; each container's output is the next one's input Dependent stages such as preprocessing, prediction and postprocessing
Inference components Each model is deployed as its own component with declared CPU, accelerator and memory needs Several models that must be added, removed or updated independently with explicit resource shares

Multi-model endpoints

A multi-model endpoint uses the same fleet of resources and a shared serving container to host all of your models[6], which raises endpoint utilization compared with single-model endpoints. Because one container serves every model, it is ideal for a large number of models that use the same ML framework[6], and it works best when the models are fairly similar in size and invocation latency[6].

Multi-container endpoints with direct invocation

A multi-container endpoint deploys multiple containers, which can use different models or frameworks, on a single endpoint[7]. With direct invocation, up to 15 inference containers share the endpoint, and each request specifies the container to invoke with the TargetContainerHostname parameter[8]; only the container with that hostname processes the request[8]. The hosting FAQ describes these containers as running with no cold starts, which suits keeping all the models in memory[1]. Here a cold start is a model-loading delay: on a multi-model endpoint, less frequently used models may incur some cold start latencies since the models are dynamically loaded to an instance[6], which differs from the serverless compute start-up described in the first section. This suits independent models with separate framework-specific containers; different frameworks alone do not rule out an MME, since GPU-backed MMEs can use Triton (NVIDIA Triton Inference Server, which can be used to deploy models from all major ML frameworks[9]) to serve multiple frameworks.

Inference pipelines

An inference pipeline (listed among SageMaker AI's advanced endpoint options as Serial Inference Pipelines[10]) is a SageMaker AI model composed of a linear sequence of two to fifteen containers[11]. SageMaker AI handles each invocation as a sequence of HTTP requests: the first container handles the initial request, its intermediate response becomes the request to the second container, and so on, and SageMaker AI returns the final response to the client[11]. All the containers run on each instance of the endpoint or transform job[11], so one pipeline serves real-time requests or batch transform jobs, and the client never coordinates separate stage calls. The same multi-container endpoint is configured for one mode or the other: its containers run in sequence as an inference pipeline, or each container is accessed individually by direct invocation[7]. A request to an endpoint configured for direct invocation must specify a target container[8], so direct invocation runs one container and never the whole chain. The figure below contrasts the two modes: chained in an inference pipeline, or picked one at a time by direct invocation.

Inference components

An inference component is a SageMaker AI hosting object that deploys a model to an endpoint and specifies how that model uses the endpoint's resources[12]: the CPU cores, accelerators and memory it requires. Because the component decouples the model from the endpoint, you can add or remove models as needed and update each model independently[12]. Production-variant weights do a different job: they set the percentage of traffic routed to each variant[13] and reserve no accelerator memory for any model.

The choice follows how the models relate: one framework and many models suggests an MME, independent models on different frameworks suggest direct invocation, dependent stages suit an inference pipeline, and explicit per-model resources with independent updates call for inference components.

Inference pipelineRequestContainer 1: preprocessContainer 2: predictContainer 3: postprocessResponse to clientDirect invocationRequestTargetContainerHostname = BContainer Anot invokedContainer Bruns aloneContainer Cnot invokedResponse from B
Inference pipeline versus direct invocation on a SageMaker AI multi-container endpoint: every container in sequence, or only the container the request names.

How a multi-model endpoint loads and caches models

This section explains why latency on a multi-model endpoint varies from model to model, and why adding a model needs no endpoint change. Both follow from one design choice: SageMaker AI does not download every model when you create the endpoint; it loads and caches models when you invoke them[6].

Each request names its model in the TargetModel parameter, the model's path relative to the Amazon S3 prefix given when the SageMaker AI model was created[14]. For each request, SageMaker AI does the following[6]:

  1. Routes the request to an instance behind the endpoint.
  2. Downloads the model from the S3 bucket to that instance's storage volume.
  3. Loads the model into the container's memory (CPU or GPU memory, depending on the instance type). If the model is already loaded, the invocation is faster because neither the download nor the load is needed.

The figure below shows the three outcomes: a model already in memory answers at once, a model still on the storage volume needs only a load, and a model on neither needs a download first. When an instance's memory utilization is high and another model must be loaded, SageMaker AI unloads unused models from the container; unloaded models remain on the storage volume and can be loaded again without another download from S3, and models are deleted from the volume only when it reaches capacity[6]. SageMaker AI keeps routing a model's requests to the instance where it is already loaded, and sends some requests to another instance when the model is busy[6].

What the cache means for design

A multi-model endpoint trades predictable latency for density; a model that cannot accept an occasional load delay belongs on its own endpoint.

RequestTargetModel = model pathIn container memory?Run inferenceno download or loadOn storage volume?Load into memoryunloads unused models if fullDownload from S3to the storage volumeYesNoYesNo
Multi-model endpoint request handling on SageMaker AI: in memory, on the storage volume, or downloaded from Amazon S3 first.

Hosting a model trained outside AWS

A model trained on a laptop, in another cloud or on an on-premises cluster is still a set of artifacts plus code that knows how to serve them, so moving it to AWS is a question of which runtime accepts that package. The AWS MLA-C02 exam guide names the skill 'Deploy models that were built outside of AWS into AWS environments (for example, Amazon SageMaker AI, Amazon Bedrock Custom Model Import)'[2], and the deployment target follows from what you hold:

What you hold Deployment target
Framework model artifacts, for example a PyTorch or TensorFlow model A SageMaker AI model that uses an AWS-provided framework container
Customized weights of a supported foundation model architecture, to be served by Amazon Bedrock Amazon Bedrock Custom Model Import
ML services already packaged as container images on Kubernetes Amazon Elastic Kubernetes Service (Amazon EKS), with the images in Amazon Elastic Container Registry (Amazon ECR)

SageMaker AI hosting for an externally trained model

SageMaker AI can take a framework model that you trained outside of SageMaker AI and deploy it on any of its hosting options[1]; a SageMaker AI training job is not a prerequisite, so retraining a compatible model just to obtain a training-job record adds nothing. You package the artifacts as a model.tar.gz file in the directory structure that the framework container expects[1]. Before deploying, note the AWS Region of the S3 bucket, the S3 URI of the model artifacts, the IAM role for SageMaker AI, and the framework and version of an AWS-provided image[12]. That IAM role is the execution role: the identity SageMaker AI uses to read the artifacts and pull the image.

One regional rule trips many migrations: the Amazon S3 bucket where the model artifacts are stored must be in the same AWS Region as the model that you are creating[12]. Copying the artifacts to a bucket in the deployment Region fixes it. Granting broader S3 permissions does not, because the rule concerns where the bucket is, not who may read it.

Amazon Bedrock Custom Model Import

Custom Model Import creates a custom model in Amazon Bedrock from a foundation model that you customized in another environment, such as SageMaker AI[15], and serves it with on-demand throughput through the InvokeModel or InvokeModelWithResponseStream operation[15]. It imports weights; it is not a container host:

Uploading an inference Docker image does not work here, because the import expects model files of a supported architecture, not a serving container.

Amazon EKS for existing containerized services

When an existing Kubernetes deployment already packages each ML service as a standalone container image, the move to AWS is a lift-and-shift (moving the workload without redesigning it): push the images to Amazon ECR and deploy them to the Amazon EKS cluster. Pods must reference the full registry/repository:tag image name[17], and the nodes need pull permissions: on managed or self-managed nodes the worker node IAM role needs Amazon ECR permissions, and on AWS Fargate the Fargate pod execution role provides them[17]. Moving an image does not change the trained model inside it, so neither retraining nor a rewrite into another ML orchestration framework is part of the move.

Match the artifact you hold to the runtime that accepts it: framework artifacts to a SageMaker AI model whose artifact bucket is in the same Region[12], supported foundation model weights to Custom Model Import[15], and existing container images to Amazon EKS, pulled from Amazon ECR[17].

Running foundation models on Amazon Bedrock

For Amazon Bedrock's serverless model inference, you do not choose an instance; the decisions are how capacity is allocated and where a request may be processed. Bedrock serves a foundation model (FM, a large pre-trained model used through an API) through several capacity and routing options, among them those in the table below, and a custom model has its own path to on-demand serving.

Option What you get Fits when
On-demand inference Usage-based access with no capacity to set up Variable or moderate traffic
Provisioned Throughput Dedicated capacity in model units at an hourly price Consistent, high throughput for a supported model
Batch inference An asynchronous job that reads prompt files from Amazon S3 and writes output files to S3 Large sets of independent prompts that need no immediate answer
Cross-Region inference profile Bedrock picks a Region from the profile's set for each request Higher throughput across Regions, where data location rules allow

Provisioned Throughput

Provisioned Throughput lets you provision a higher level of throughput for a model at a fixed cost, billed hourly[18]. Capacity is bought in model units (MUs), and each MU delivers a specific number of input and output tokens per minute for the model[18]. You choose no commitment, 1 month or 6 months; the longer the commitment, the more discounted the hourly price, and billing continues until you delete the Provisioned Throughput[18]. Support differs by model and Region, so confirm the model is on the Provisioned Throughput supported list for your Region before planning on it. On-demand inference is the alternative whenever usage-based access without a capacity commitment meets the requirement.

Custom models: Provisioned Throughput or a custom model deployment

The Provisioned Throughput page states that if you customized a model, you must purchase Provisioned Throughput to use it[18]. Models brought in with Custom Model Import (previous section) follow their own path: you can use a model that you import with on demand throughput[15]. For a model created with a model customization job[19], the Provisioned Throughput rule has one documented alternative: a custom model deployment sets up on-demand inference for a custom model, so you pay only for what you use[19]. It requires a model customized on or after July 16, 2025 from a supported base model (Amazon Nova Lite, Nova 2 Lite, Nova Micro or Nova Pro in US East (N. Virginia), or Meta Llama 3.3 70B Instruct in US West (Oregon))[19]. You invoke it by passing the deployment's Amazon Resource Name (ARN) as the modelId[19].

The deployment and the model are separate resources. Deleting a custom model deployment ends its on-demand inference but does not delete the underlying custom model; to use the model on demand again, you create a new deployment[19]. Deleting the custom model itself to stop one deployment removes the retained model, not just its serving resource.

Batch inference

Batch inference lets you submit multiple prompts and generate responses asynchronously: you upload input files to Amazon S3, submit a job that names the bucket, and retrieve the output files from S3[20]. Each input record is processed independently without multi-turn interaction, so tool calling is not supported[20]: an agent conversation that needs back-and-forth tool exchanges cannot run as a batch job. Batch inference isn't supported for provisioned models[20], and it never reserves capacity for synchronous application requests.

Cross-Region inference profiles

An inference profile defines a foundation model and the AWS Regions to which requests can be routed[21]. The system-defined cross-Region profiles come in two scopes: with a geographic profile Bedrock selects a commercial Region within that geography (such as US or EU), and with a global profile it selects any supported commercial Region[21]. The application specifies the inference profile's ARN when calling InvokeModel, InvokeModelWithResponseStream, Converse or ConverseStream[22] instead of managing separate regional calls, and there is no additional routing cost; the price is calculated from the Region in which you call the profile[21]. Choose the geographic scope when data must stay within a geography. A single-Region model ID never produces cross-Region routing, and inference profiles currently don't support Provisioned Throughput[21], so the two are separate ways to raise throughput, not a combination.

On Bedrock, the options covered here are pay per use, reserve units, batch the work, or widen the Regions; custom models add the deployment-versus-model distinction.

Foundation models on SageMaker AI hosting

Some requirements need the opposite of Bedrock's serverless approach: control over the instances that serve a foundation model. AWS's decision guide states the split: Amazon Bedrock is serverless, meaning you do not have to manage infrastructure[23], while SageMaker AI is the choice when you need to access the container or orchestration layer to directly manage cost-latency-throughput tradeoffs[23]. Two paths put an FM on SageMaker AI hosting.

Amazon SageMaker JumpStart

SageMaker JumpStart is a model hub that offers built-in publicly available and proprietary foundation models[23]. Deploying a JumpStart foundation model follows the SageMaker Studio model deployment steps to a SageMaker AI endpoint[24], where you select the hosting compute and deployment settings yourself; JumpStart optimized deployments also offer preset configurations for a target use case with a cost, throughput, latency or balanced optimization[24]. Some models require you to accept an end-user license agreement before deployment[24].

Amazon Bedrock Marketplace

Bedrock Marketplace offers over 100 popular, emerging and specialized FMs in addition to Bedrock's own selection[25], and it mixes the two platforms. After you subscribe to a catalog model, you deploy it to a SageMaker AI endpoint, providing the endpoint name, the number of instances and the instance type; the model is hosted by SageMaker AI[26]. You then call it through Bedrock: the Converse or InvokeModel operation, with the endpoint ARN as the model ID[27], with Converse available only for compatible models[27]. Because the model is reached through Bedrock's APIs, it works with Bedrock tools such as Agents, Knowledge Bases and Guardrails[25]. So a Marketplace model is not ordinary serverless Bedrock access: you pick and pay for its instances.

Marketplace and Custom Model Import are easy to mix up because both end with a non-native model reachable from Bedrock. A Marketplace subscription deploys a catalog model to SageMaker AI hosting; Custom Model Import brings in weights that you customized elsewhere. Neither activates the other.

When the requirement is to invoke an FM through an API without selecting serving infrastructure, choose Amazon Bedrock; when it names instance types or deployment settings, choose a SageMaker AI endpoint through JumpStart; when the model is offered only through Bedrock Marketplace, subscribe and deploy it to its SageMaker AI endpoint.

Converse: one message format across models

A team that moves its chatbot from one FM to another finds that each model's native request body, the format that InvokeModel takes, is different; the parameters for that body are listed per model in the inference parameters documentation[28]. The Converse API exists to remove that rework.

Converse, and ConverseStream for streaming responses, provide a consistent API that works with all Amazon Bedrock models that support messages, so you can write code once and use it with different models[29]. A request carries messages (the role and content of each turn), an optional system prompt, and inferenceConfig for the inference parameters common to all models[29]; parameters unique to one model go in additionalModelRequestFields[29]. The shared interface standardizes the request shape, not the models: a capability that one model lacks does not appear because the interface is shared. The same request can also carry toolConfig for tool use, described in the next section, and guardrailConfig to apply a guardrail.

Streaming and model independence are separate properties. InvokeModelWithResponseStream streams output too, but its request body still follows the selected model's own inference format; when an application needs both streaming and one message format across models, ConverseStream is the operation. Permissions follow the base operations: calling Converse requires permission for bedrock:InvokeModel, and ConverseStream requires bedrock:InvokeModelWithResponseStream[29].

Use Converse for portable conversation code, ConverseStream when that code must stream, and keep model-specific options in additionalModelRequestFields.

Client-side tool use: your code runs the tool

A model sometimes needs information it does not have, such as today's most-played song on a radio station; tool use settles who fetches it. In Amazon Bedrock, the model doesn't directly call the tool[30]: you supply definitions of the tools with the request, the model decides when one is needed, and something else runs it. Bedrock documents three modes of tool use[30], which differ in who runs the tool:

Mode Who runs the tool
Client-side tool use Your application code, after the model returns a tool request; available with the Converse, InvokeModel, Responses and Chat Completions APIs
Server-side tool use Amazon Bedrock, which invokes a registered Lambda function or AgentCore Gateway on the model's behalf; currently available on the Responses API
Anthropic Claude tool use Your application code, using Anthropic-defined tool types and the Anthropic Messages request format

Bedrock also provides the OpenAI Responses API[31] and the OpenAI Chat Completions API[32]. AgentCore Gateway, which exposes existing backends as tools, is described under AgentCore Gateway: existing backends as tools.

With Converse, client-side tool use is a loop of five steps, which the figure below traces as an exchange between your application and the model:

  1. The application sends the messages plus tool definitions (name, description, input schema) in toolConfig.
  2. The model stops with the stop reason tool_use and returns a toolUse block naming the tool, its inputs and a toolUseId.
  3. The application runs the tool itself.
  4. The application sends a toolResult block that echoes the same toolUseId, so the model can match the result to the request[28].
  5. The model continues and generates its answer using the result.

The Converse example in the Bedrock documentation[28] follows exactly this pattern: it checks stopReason for tool_use, calls the tool, and appends a user message whose content is the toolResult. Execution ownership is the point: in client-side mode your code runs the tool, and in a successful tool-use loop you send its result back so the model can continue its answer. The optional toolChoice field defaults to auto, in which the model decides whether to request a tool; any and tool force a tool request and are supported only by some models[28].

This loop is a property of a direct model call. Configuring an agent's action groups, covered in the next section, is a different layer, in which the agent orchestrates the steps.

Your applicationModel on Amazon Bedrock1 messages + tool definitions (toolConfig)2 stopReason tool_use + toolUse block3 Run the tool4 toolResult with the same toolUseId5 answer that uses the result
Client-side tool use with the Amazon Bedrock Converse API: the model requests a tool, your application runs it and returns the result.

Configuring an Amazon Bedrock Agents Classic agent

Amazon Bedrock Agents Classic is the current name of Amazon Bedrock Agents (launched November 2023); it is no longer open to new customers from July 30, 2026, and AWS recommends migrating its workloads to Amazon Bedrock AgentCore[33]. Existing agents keep running, so their configuration still matters. This section covers the three capabilities you configure on an Agents Classic agent: action groups, knowledge base associations and code interpretation. One rule applies to every change: prepare the agent after changing its configuration, before you test it[34]. Preparing, with Prepare in the console or the PrepareAgent operation, packages the agent with your latest changes to its working draft[35].

Action groups: the definition is separate from the execution

An action group tells the agent which actions exist and how each one is carried out. You define the actions with an OpenAPI schema (a standard machine-readable API description) that describes each action as an API operation, or with function details that list the parameters the agent must elicit from the user[36]. When the agent decides to invoke an action, it elicits the parameters it needs[36] and hands them to the fulfillment option you configured, chiefly one of two:

The schema describes the operation; the fulfillment option supplies its implementation. Return control and client-side tool use (previous section) both leave execution to your application, but at different layers: return control is a setting of an agent's action group, while client-side tool use belongs to a direct model call with toolConfig. An AgentCore Gateway tool definition is not an action group configuration either; Gateway exposes backends as MCP (Model Context Protocol) tools, as described under AgentCore Gateway: existing backends as tools.

Knowledge base association

Creating and syncing a knowledge base connects it to no agent. You associate the knowledge base with the agent, during or after agent creation, and provide instructions that tell the agent when and how to query it[34]; the agent includes these instructions in its prompt context to decide whether to retrieve information from the knowledge base for a given user request[34]. An action group schema cannot stand in for this association: it describes operations and their inputs, not a knowledge base.

Code interpretation

Code interpretation enables the agent to generate, run and troubleshoot code in a secure test environment[38], so it can analyze and visualize data and extract information from files the user uploads[38] and answer from the results of actual execution rather than from code text alone. You enable Code Interpreter in the agent builder, then save and prepare the agent to apply the change before testing[39]. Return control is not a managed code executor: it sends the selected action and inputs back to your application to fulfill.

On an Agents Classic agent, the schema says what an action is, the fulfillment option says who runs it, a knowledge base needs an association plus instructions, and code interpretation is the managed way to execute generated code; prepare after each change.

Hosting agent code on AgentCore Runtime

A team has a working agent written with LangGraph that calls a model from another provider, and wants managed hosting without rewriting it. Amazon Bedrock AgentCore Runtime is built for this case: it is framework agnostic, working with frameworks such as LangGraph, Strands and CrewAI and with custom agents that use no specific framework[40], and it works with any large language model, such as models offered by Amazon Bedrock, Anthropic Claude, Google Gemini and OpenAI[40]. Rewriting a working agent into another framework is not a prerequisite for using it.

The service contract

What Runtime does require is its service contract: the standardized communication protocol that your agent application must implement to integrate with the hosting infrastructure[41]. You select a protocol for the runtime, and the container must serve that protocol's endpoints and message format. The protocol comparison[41] lists four:

Protocol Port Mount path Message format Discovery Use case
HTTP 8080 /invocations, /ws REST JSON or SSE, WebSocket None Direct API calls, real-time streaming
MCP 8000 /mcp JSON-RPC Tool listing Tool servers
A2A 9000 / (root) JSON-RPC 2.0 Agent Cards Agent-to-agent communication
AG-UI 8080 /invocations, /ws Event streams (SSE or WebSocket) None Interactive UI experiences

Server-sent events (SSE) deliver real-time streaming responses[42], while the WebSocket endpoint supports real-time bidirectional streaming[42]; the MCP contract uses a JSON-RPC based request/response format[43]. A container that merely starts is not enough. An application that exposes only an MCP server, deployed under the HTTP protocol, does not serve the /invocations interface the runtime then expects; configure the runtime protocol and the application's server consistently.

MCP or A2A

The two protocols that connect an agent to other software serve different roles, and Runtime lets agents communicate with tools and other agents through either[40]:

  • MCP (Model Context Protocol) is how a service exposes tools to agent clients. Its discovery mechanism is a tool listing.
  • A2A (Agent-to-Agent protocol) is for multi-agent communication and discovery[41], with Agent Cards as its discovery mechanism.

A tool server and a collaborating agent are different integration roles: when another agent must discover and work with yours, A2A is the contract, and an MCP tool listing does not substitute for it.

AgentCore Runtime accepts the agent you already have, whatever its framework and model, provided the container implements the selected protocol's contract.

Inbound and outbound authentication for an agent

An agent sits between two parties: the callers that invoke it and the tools that it invokes. Each side has its own authentication path, and the figure below shows both, with AgentCore Gateway, which converts APIs, Lambda functions and existing services into MCP-compatible tools[44], on the tool side.

Inbound authentication: who may invoke the agent

AgentCore Runtime authenticates callers with IAM SigV4 (AWS Signature Version 4) by default, or with JWT (JSON Web Token) bearer tokens checked against an authorizer configuration: a discovery URL plus the allowed audiences, clients or scopes[45]. That lets end users authenticate through a corporate identity provider such as Okta, Microsoft Entra ID or Amazon Cognito into only the agents they may use[40]. A runtime supports either SigV4 or JWT inbound authentication, not both at the same time[45].

Outbound authentication: what the agent may call

Outbound authentication lets the agent access third-party services such as Slack, Zoom and GitHub, either on behalf of users or autonomously, using OAuth or API keys[40]. For delegated user access, the agent retrieves OAuth tokens on behalf of end users through the authorization code grant[45]. Successful inbound authentication alone does not automatically authorize a downstream request; the agent still needs an appropriate credential for each tool that requires authentication[46].

Inbound authentication answers who may call the agent; outbound authentication answers what the agent may call.

Calleruser or applicationAgentCore Runtimeyour agent codeAgentCore GatewayMCP toolsThird-party APIfor example GitHubLambda functionOpenAPI APIinbound authSigV4 or JWToutbound authoutbound authOAuth or API key
Inbound and outbound authentication for an agent on Amazon Bedrock AgentCore Runtime, with AgentCore Gateway exposing existing backends as MCP tools.

AgentCore Gateway: existing backends as tools

AgentCore Gateway converts APIs, Lambda functions and existing services into MCP-compatible tools[44] and supports OpenAPI, Smithy and Lambda as tool input types[44]. Its translation capability converts agent requests that use MCP into API requests and Lambda invocations[44], so the backend keeps its business logic and the gateway only adapts access to it. Gateway also manages both inbound authentication (verifying agent identity) and outbound authentication (connecting to tools), including OAuth flows, token refresh and credential storage[44]. Direction is named from each component's side: Gateway's inbound authentication checks the agent that calls it, which is that agent's outbound call in the Runtime terms of the previous section. Importing the API's documentation into a knowledge base is no substitute: it makes the descriptions retrievable but never executes the action.

Gateway turns existing backends into tools: with IAM or JWT inbound authentication configured, the agent authenticates to Gateway with its outbound credential, which Gateway's inbound authentication validates[47], and Gateway then authenticates outbound to each backend (a Gateway target) that requires it[46].

Configuring a knowledge base query

When an application asks an Amazon Bedrock knowledge base a question, it makes two choices: which operation to call, and how retrieval behaves for that query. These query-time choices fall under the AWS MLA-C02 exam guide skill 'Apply Retrieval Augmented Generation (RAG) system configurations (for example, retrieval strategies, reranking)'[2]; RAG means adding retrieved passages to a model's prompt at request time.

Retrieve or RetrieveAndGenerate

The choice decides whether the managed call owns only retrieval or the whole retrieve-and-generate path. Calling Retrieve and expecting a synthesized answer with citations asks the retrieval-only operation for a generation step it does not perform.

Both operations accept a retrievalConfiguration whose vectorSearchConfiguration holds the retrieval settings below[50]. Those settings apply to a custom knowledge base, one where you configure and manage some of the underlying infrastructure[51]. A fully managed knowledge base, where Amazon Bedrock manages the ingestion, storage, indexing, and retrieval infrastructure, including embedding and reranking with service-managed models by default[51], uses managedSearchConfiguration instead, always uses hybrid search, and uses a service-managed reranker by default only with managed embedding[48], meaning the service-managed embedding model rather than your own Bedrock embedding model chosen at creation time[51].

Listing: a retrievalConfiguration fragment for a Retrieve request to a custom knowledge base

"retrievalConfiguration": {
  "vectorSearchConfiguration": {
    "numberOfResults": 10,
    "overrideSearchType": "HYBRID",
    "filter": { "equals": { "key": "department", "value": "finance" } },
    "rerankingConfiguration": { ... }
  }
}

The ... marks the omitted reranker settings (the reranker model's ARN among them). The keys are the fields of the vector search configuration[52], each explained in the next subsection: numberOfResults caps the results, overrideSearchType sets the search type, filter restricts which documents may match, and rerankingConfiguration adds a reranker.

The settings, stage by stage

The figure below orders these settings along the query path; query decomposition, like generation and its guardrail, applies only to RetrieveAndGenerate[50].

Each setting owns one stage: decomposition shapes the query, search type and filters decide what can match, the result limit caps how much comes back, reranking orders it, and the guardrail checks the generated answer.

User queryQuery decompositionoptional subqueriesRetrieveAndGenerate onlySearch + filterssemantic or hybridTop resultsup to numberOfResultsRerankingoptional reorderRetrievereturns the chunksGenerationRetrieveAndGenerate onlyguardrail appliedAnswerwith citations
Amazon Bedrock Knowledge Bases query path: decomposition (RetrieveAndGenerate only), filtered search, result limit, reranking, then chunks or a cited answer.

Requirements matched to deployment features

The AWS MLA-C02 exam guide lists 'Task 3.1: Manage deployment infrastructure for ML and AI model types.'[2], with skills that include 'Select deployment orchestrators and multi-model or multi-container deployment strategies' and 'Evaluate and select appropriate foundation model (FM) deployment options'; the patterns below fall under that task, each with its section named in italics; for each requirement, the feature to choose is the one whose mechanism meets it. Task 3.1 also lists the skills 'Select model inference strategies (for example, real-time and batch processing)', 'Deploy models that were built outside of AWS into AWS environments (for example, Amazon SageMaker AI, Amazon Bedrock Custom Model Import)', 'Deploy and configure agents for specific tasks, integration with other services and tools, and agent communication protocols' and 'Apply Retrieval Augmented Generation (RAG) system configurations (for example, retrieval strategies, reranking)' (AWS MLA-C02 exam guide, domain 3[2]).

Inference options and shared endpoints

  • Requirement: interactive request; proposed: batch transform. Batch transform returns output files in Amazon S3 when its job finishes, so it cannot answer a transaction synchronously; use real-time inference (Four inference options).
  • Requirement: intermittent traffic with large payloads; proposed: Serverless Inference. Serverless Inference does not provide the S3 request-and-result workflow and caps payloads at 4 MB; large inputs that can wait need Asynchronous Inference (Asynchronous Inference).
  • Requirement: bursty traffic plus a GPU or VPC configuration; proposed: Serverless Inference. Serverless Inference excludes GPUs and VPC configuration, and Provisioned Concurrency only warms serverless capacity; use real-time inference (Four inference options).
  • Requirement: independent tenant models; proposed: inference pipeline. An inference pipeline chains stages for every request; per-tenant models on one framework can use a multi-model endpoint (Sharing one endpoint).
  • Requirement: preprocessing chain; proposed: direct invocation. Direct invocation runs only the container a request names; a chain needs an inference pipeline (Sharing one endpoint).
  • Requirement: independent models in separate framework-specific containers; proposed: multi-model endpoint. A multi-model endpoint serves every model from one shared serving container[6], so models that each need their own framework container fit a multi-container endpoint with direct invocation; a GPU-backed MME on Triton[54] is the multi-framework exception (Sharing one endpoint).
  • Requirement: GPU memory per model; proposed: traffic weights. Production-variant weights route traffic; inference components declare each model's accelerator and memory needs (Sharing one endpoint).
  • Requirement: new tenant model; proposed: new production variant. A multi-model endpoint loads a compatible model uploaded under its S3 prefix on first invocation, with no endpoint update (How a multi-model endpoint loads).

External models and foundation models

  • Requirement: deploy artifacts from a cross-Region bucket; proposed: broader S3 permissions. The artifacts must sit in the deployment Region; permissions do not change location (Hosting a model trained outside AWS).
  • Requirement: Custom Model Import; proposed: a Docker image as its input. The import takes Hugging Face format weights of a supported architecture, not containers (Hosting a model trained outside AWS).
  • Requirement: a role for the import job; proposed: invoke permissions only. Invocation permission does not let the job read or decrypt the source files (Hosting a model trained outside AWS).
  • Requirement: reserved capacity for synchronous traffic; proposed: Bedrock batch inference. Batch inference creates asynchronous S3 jobs; dedicated online capacity is Provisioned Throughput (Running foundation models on Amazon Bedrock).
  • Requirement: multi-Region routing; proposed: a plain model ID. Only a cross-Region inference profile routes across Regions (Running foundation models on Amazon Bedrock).
  • Requirement: deploy a Marketplace model; proposed: Custom Model Import. A catalog subscription deploys to a SageMaker AI endpoint; import is for weights customized elsewhere (Foundation models on SageMaker AI hosting).
  • Requirement: portable streaming chat code; proposed: InvokeModelWithResponseStream. It streams, but its body follows each model's own format; use ConverseStream (Converse).

Agents and retrieval

  • Requirement: run an existing agent on AgentCore Runtime; proposed: rewrite the agent. Runtime is framework agnostic; implement the protocol contract instead (Hosting agent code on AgentCore Runtime).
  • Requirement: deploy an MCP-only server; proposed: the HTTP protocol. The runtime protocol and the server must match (Hosting agent code on AgentCore Runtime).
  • Requirement: agent discovery; proposed: an MCP tool listing. Agent discovery and communication is A2A, with Agent Cards (Hosting agent code on AgentCore Runtime).
  • Requirement: tool authorization; proposed: the inbound session. The agent needs outbound credentials for tools that require authentication (Inbound and outbound authentication).
  • Requirement: an API as an agent tool; proposed: its documentation in a knowledge base. Retrieval returns text; AgentCore Gateway executes the backend as an MCP tool (AgentCore Gateway).
  • Requirement: an agent that consults a knowledge base; proposed: creating the knowledge base alone. It needs an association plus instructions, then a prepared agent (Configuring an Agents Classic agent).
  • Requirement: a code executor; proposed: return control. Return control hands execution to your application; code interpretation runs generated code in a secure environment (Configuring an Agents Classic agent).
  • Requirement: recover missing keyword matches; proposed: a reranker. A reranker reorders only what search returned; enable hybrid search on a supported store (Configuring a knowledge base query).
  • Requirement: department restriction; proposed: writing it into the prompt. A metadata filter restricts which documents may satisfy the query (Configuring a knowledge base query).
  • Requirement: compound question; proposed: higher result limit. More results still come from the original query; enable query decomposition (Configuring a knowledge base query).
  • Requirement: explain fewer results than numberOfResults with hierarchical chunking; proposed: an ingestion failure. Child chunks that share a parent come back as that parent; fewer results alone do not indicate an ingestion failure (Configuring a knowledge base query).

Every Task 3.1 skill[2] begins with 'Select', 'Evaluate and select', 'Deploy', 'Configure' or 'Apply', and across all three groups the feature to choose is the one whose mechanism meets the stated requirement.

The four SageMaker AI inference options

Decision factorReal-time inferenceServerless InferenceAsynchronous InferenceBatch transform
How the caller gets the resultSynchronous response to each requestSynchronous response to each requestResult written to Amazon S3; optional SNS notificationOutput files in Amazon S3 when the job finishes
Documented size and time limitsPayload up to 25 MB; up to 60 s processing (8 min streaming)Payload up to 4 MB; memory 1 GB to 6 GBPayload up to 1 GB; up to 60 minutes processingMini-batch payload up to 100 MB
Capacity between requestsInstances stay provisioned unless scale-to-zero is configuredCan scale to zero; the next request can hit a cold startCan autoscale to zero; requests queue until it scales upInstances start with the job; no persistent endpoint
Hosting features (selection)GPUs, VPC configuration, Model Monitor, data capture, multiple production variants, inference pipelines, among othersNone of the features listed for real-time inferenceEndpoint accepts only asynchronous invocationsCan run an inference pipeline model
Best fitSustained traffic needing low, consistent latencyIntermittent or unpredictable traffic that tolerates cold startsLarge payloads or long processing that can be queuedLarge datasets available up front

Decision tree

Does each prediction answeran individual request?Batch transformjob writes files to S3NoCan the caller collectthe result later?YesAsynchronous InferenceS3 in, S3 outYesIntermittent traffic,cold starts acceptable,no excluded feature (such asGPU, VPC, data capture)?NoServerless Inferencescales to zeroYesReal-time inferencepersistent endpointNo

Sharp facts the exam loves — give these one last read before exam day.

Cheat sheet

Sharp facts the exam loves — scan these before test day.

Real-time inference fits interactive requests that require immediate predictions

When an application needs synchronous predictions with low latency and sustained throughput, use Amazon SageMaker AI real-time inference. Keep sufficient serving capacity available for the response-time requirement; Asynchronous Inference is appropriate when the caller can collect its result later.

Trap Using batch transform for an interactive transaction, which returns results through an offline job rather than the transaction's synchronous response.

3 questions test this
Batch transform scores stored datasets without a persistent endpoint

When predictions are needed for a stored dataset rather than individual online requests, use Amazon SageMaker AI batch transform. The job provisions compute for the workload and writes results to Amazon S3, avoiding the need to maintain a continuously running inference endpoint.

Trap Keeping a real-time endpoint running between scheduled scoring jobs, which reserves serving infrastructure even when the offline workload has no requests.

3 questions test this
Asynchronous inference queues large or long-running inference requests

When an application can wait for a result and submits large or long-running requests, use Amazon SageMaker AI Asynchronous Inference. Requests identify input in Amazon S3, and outputs are written to S3 rather than returned as synchronous predictions. Optional Amazon SNS notifications tell the application when processing succeeds or fails.

Trap Using Serverless Inference merely because traffic is intermittent, which does not supply the asynchronous S3 request-and-result workflow.

3 questions test this
On-demand Serverless Inference trades cold starts for lower idle cost

When inference traffic is intermittent and the application tolerates cold starts, use on-demand Amazon SageMaker AI Serverless Inference. SageMaker AI launches and scales compute with traffic and scales it to zero when idle, without requiring instance selection or instance-scaling policies.

Trap Choosing a continuously provisioned real-time endpoint for an idle-cost requirement despite accepting cold starts, which retains provisioned capacity between traffic bursts.

3 questions test this
Serverless Inference is unsuitable when required hosting features are excluded

Amazon SageMaker AI Serverless Inference does not support, among other features, GPUs, VPC configuration, Model Monitor, data capture, multiple production variants, or inference pipelines. When any of these is a deployment requirement, choose a compatible hosting mode such as real-time inference rather than treating all endpoint modes as interchangeable.

Trap Adding provisioned concurrency to a serverless endpoint to obtain GPU support, which warms serverless capacity without changing the endpoint's feature support.

3 questions test this
Multi-model endpoints share serving infrastructure among compatible models

When many models use the same ML framework and have compatible serving requirements, a SageMaker AI multi-model endpoint can host them in a shared serving container and instance fleet. Sharing raises utilization compared with a separate endpoint for every model. The application must tolerate loading delays for infrequently used models.

Trap Using an inference pipeline to host independent tenant models, which chains processing stages rather than selecting one model for each tenant request.

4 questions test this
Multi-model endpoint latency depends on whether the requested model is already loaded

A SageMaker AI multi-model endpoint loads models on demand and caches them in memory. Under memory pressure it unloads unused models, which can remain on the instance's storage volume for faster reloading. A model with strict latency requirements or disproportionately high traffic is a better candidate for dedicated hosting than for competing with infrequent models in this cache.

Trap Increasing the total number of model files in S3 to warm the endpoint, which does not load those models into serving memory.

5 questions test this
Adding a multi-model endpoint model does not require rebuilding the endpoint

To add a compatible model to an existing SageMaker AI multi-model endpoint, upload its artifact to the endpoint's configured S3 location and invoke that model. SageMaker AI loads the requested artifact dynamically, so adding a model does not require an endpoint update.

Trap Creating a production variant for every newly added tenant model, which uses variant-based deployment instead of the endpoint's dynamic model-loading mechanism.

4 questions test this
An inference pipeline runs dependent serving stages in sequence

When inference requires preprocessing, prediction, and postprocessing as a connected sequence, use a SageMaker AI inference pipeline. The containers run in order, passing each stage's output to the next. This keeps the serving transformations with the model instead of requiring the client to coordinate separate stage invocations.

Trap Using direct invocation of one container to run the entire chain, which addresses an individual container rather than serially executing all stages.

4 questions test this
Direct invocation lets independent containers share an endpoint

When separate models use different frameworks but should share SageMaker AI endpoint resources, a multi-container endpoint can expose containers through direct invocation. Each request selects its intended container rather than traversing an inference pipeline.

Trap Putting incompatible serving frameworks into one multi-model serving container, which assumes the shared-container compatibility that the models do not have.

4 questions test this
Inference components give each hosted model its own resource specification

SageMaker AI inference components describe a model and its CPU, accelerator, and memory requirements separately from the endpoint. Use them when several models should share endpoint infrastructure while being added, removed, or updated independently. The resource specification makes allocation explicit rather than assuming every model needs the same share of the host.

Trap Using endpoint traffic weights as GPU-memory reservations, which changes request routing rather than specifying a model's accelerator and memory requirements.

4 questions test this
SageMaker AI can host compatible models trained outside AWS

A model does not need a SageMaker AI training job to be hosted by SageMaker AI. For an externally trained model supported by an AWS-provided inference container, supply the model artifacts in Amazon S3 and select a compatible framework and version. The hosting configuration also needs a SageMaker AI execution role with access to the required resources.

Trap Retraining an otherwise compatible model solely to obtain a SageMaker AI training-job record, which is not a prerequisite for deployment.

3 questions test this
SageMaker AI model artifacts must be in the deployment Region

The S3 bucket containing a SageMaker AI model's artifacts must be in the same AWS Region as the model being created. When moving an externally trained model to another Region, place the artifacts in an appropriate regional bucket before creating the hosting model.

Trap Granting broader S3 permissions to compensate for a cross-Region artifact bucket, which changes authorization but not the regional deployment requirement.

3 questions test this
Custom Model Import brings supported external model weights into Bedrock

When a supported foundation-model architecture has been customized outside Amazon Bedrock and managed Bedrock inference is required, use Custom Model Import. Compatibility with the documented architecture and configuration is a prerequisite; this is an import of model weights, not a generic container-hosting service. Imported models can be invoked with on-demand inference.

Trap Uploading an arbitrary inference Docker image to Custom Model Import, which expects compatible model artifacts rather than a general-purpose serving container.

2 questions test this
Bedrock imports from S3 require supported model files and source access

For a Custom Model Import job whose source is Amazon S3, prepare the model files in Hugging Face weights format and give the import service role access to them. Cross-account buckets and KMS keys require corresponding access grants. A correct file format does not substitute for permission to read or decrypt the source.

Trap Granting only model-invocation permission to the import job role, which authorizes inference rather than reading the source artifacts.

3 questions test this
Existing Kubernetes ML services can move to EKS without model retraining

When an existing Kubernetes deployment already packages ML services as standalone container images, publish those images to Amazon ECR and deploy them to the specified Amazon EKS cluster. Reference the complete ECR image location and provide image-pull permissions. Moving the hosting platform does not itself require changing the trained model or rewriting the workflow into another ML framework.

Trap Rebuilding the services in a new ML orchestration framework for a lift-and-shift requirement, which adds application changes that the existing container deployment does not need.

3 questions test this
Bedrock Provisioned Throughput reserves capacity for supported models

When a supported Bedrock model needs dedicated capacity and consistent throughput, use Provisioned Throughput. On-demand inference is the alternative when usage-based access without a provisioned-capacity commitment meets the workload requirements. Verify the chosen model and Region support the intended provisioning option.

Trap Selecting batch inference to reserve capacity for synchronous application requests, which creates asynchronous jobs instead of a dedicated online serving resource.

3 questions test this
Bedrock batch inference processes independent prompts through S3 jobs

When a large collection of prompts can be processed asynchronously, submit a Bedrock batch inference job with input files in Amazon S3 and collect the output files from S3. Each input record is processed independently. This mode is not suited to tool-calling conversations that require exchanges between the model and the client.

Trap Submitting an interactive agent tool-use conversation as a batch job, which cannot perform the required back-and-forth tool interactions.

3 questions test this
Deleting a custom model deployment preserves the underlying custom model

Deleting a Bedrock custom model deployment removes that on-demand serving resource but does not delete its underlying custom model. If inference is needed again, create a new deployment from the retained model. This separates serving-resource cleanup from model retention.

Trap Deleting the underlying custom model to stop using one deployment, which removes the retained model rather than only its serving resource.

3 questions test this
Cross-Region inference profiles route supported model requests across Regions

When the stated deployment permits inference across multiple AWS Regions, a system-defined Bedrock cross-Region inference profile can distribute supported model requests among its defined Regions. The application invokes the profile instead of managing separate regional model invocations itself. Choose a profile whose routing scope meets the application's location requirements.

Trap Using an arbitrary single-Region model identifier to obtain multi-Region routing, which does not select a cross-Region inference profile.

3 questions test this
JumpStart deployment fits foundation models that need control of the hosting environment

When a reusable foundation model must run with explicitly selected SageMaker AI hosting compute and deployment settings, choose a compatible model from SageMaker JumpStart and deploy it to a SageMaker AI endpoint. JumpStart supplies pretrained models while SageMaker AI provides configurable managed hosting. Choose Amazon Bedrock's serverless model access instead when the requirement is to invoke a supported foundation model through an API without selecting and managing its serving infrastructure.

3 questions test this
Bedrock Converse provides a consistent message interface across supported models

When a conversational application must use a consistent message-based invocation contract across supported Amazon Bedrock models, use Converse, or ConverseStream when responses must stream. This lets the application reuse its message-handling code across models that support the interface instead of adopting each model's base inference request format. Model-specific inference options can still be supplied separately, so a shared interface does not make every model's capabilities identical.

Trap Using InvokeModelWithResponseStream as the cross-model message abstraction because it streams output, although its request body still follows the selected model's inference format.

3 questions test this
Bedrock Marketplace exposes subscribed models through Bedrock APIs with SageMaker AI hosting

When a required foundation model is offered through Amazon Bedrock Marketplace, subscribe to the catalog model and deploy it to a SageMaker AI-managed endpoint. Select the endpoint's instance type and instance count rather than treating this as ordinary serverless Bedrock model access. Invoke the deployment through Bedrock InvokeModel, or Converse for compatible models, using the endpoint ARN to identify the deployment.

Trap Using Custom Model Import to activate a Marketplace catalog subscription, although import requires model artifacts from an external customization environment rather than a catalog subscription.

3 questions test this
AgentCore Runtime hosts agent code without requiring a specific framework

When existing agent code needs managed deployment, Amazon Bedrock AgentCore Runtime supports agents built with supported frameworks or custom agent implementations. It is not restricted to foundation models accessed through Amazon Bedrock. This lets a deployment preserve its chosen agent framework and model integration within the Runtime service contract.

Trap Rewriting a working agent to a different framework solely to use AgentCore Runtime, which is framework agnostic.

3 questions test this
AgentCore Gateway exposes existing backends as agent tools

When an agent must use an existing Lambda function or an API described by an OpenAPI specification, AgentCore Gateway can expose that backend through tools compatible with Model Context Protocol. The gateway adapts access to the existing capability; it does not replace the backend's business logic.

Trap Importing API documentation into a knowledge base as a substitute for a tool integration, which makes descriptions retrievable but does not execute the backend action.

3 questions test this
MCP and A2A address different agent communication needs

Use Model Context Protocol when an AgentCore-hosted service exposes tools to agent clients. Use the Agent-to-Agent protocol when the requirement is agent discovery and communication between agents. AgentCore Runtime supports both protocols, but a tool server and a collaborating agent are different integration roles.

Trap Selecting an MCP tool-listing interface as an A2A agent-discovery interface, which substitutes tool discovery for the agent communication contract.

3 questions test this
Agent access and tool access require separate authentication paths

AgentCore Runtime supports inbound authentication for clients invoking an agent and outbound authentication for the agent accessing other services. Configure each path for its caller and target, including delegated user access when required. Successful authentication into the agent does not itself establish the agent's credentials for a third-party tool.

Trap Reusing the existence of an inbound authenticated session as proof of downstream API authorization, which leaves the tool's outbound authentication requirement unresolved.

3 questions test this
AgentCore applications must implement the selected protocol's service contract

An AgentCore Runtime application must expose the endpoints and message format required by its selected protocol. For example, HTTP request handling and an MCP tool server follow different contracts. Configure the runtime protocol and the application's server consistently rather than deploying a container that merely starts successfully.

Trap Choosing the HTTP runtime protocol for an application that exposes only an MCP server, which mismatches the runtime's expected request interface.

3 questions test this
Bedrock agent action groups separate action definitions from action execution

An Amazon Bedrock Agents Classic action group defines available actions and their inputs through an OpenAPI schema or function details. Configure Lambda execution when Bedrock should pass the selected action and elicited parameters to a Lambda function. Choose return control when the calling application should execute the action instead; Bedrock returns the selected action and parameters in the agent invocation response. The schema describes the available operation, while the chosen execution path supplies its implementation.

Trap Using an AgentCore Gateway tool definition as the Bedrock Agents Classic action-group configuration, even though Gateway adapts backends into MCP tools rather than defining this agent's action group.

3 questions test this
Client-side Bedrock tool calling requires the application to execute and return tool results

For client-side tool calling in Amazon Bedrock, supply tool definitions with the model request so the model can select a tool and return the inputs it needs. Application code then executes the requested tool and sends its result back in the conversation, allowing the model to continue generation using that result. This model-level interaction is distinct from configuring fulfillment for a Bedrock Agents Classic action group. In supported server-side tool-use configurations, Bedrock executes registered tools on the application's behalf instead; execution ownership depends on the selected mode.

3 questions test this
A Bedrock agent needs a knowledge-base association and instructions to guide retrieval

When an existing Amazon Bedrock Agents Classic deployment should answer from a Bedrock knowledge base, associate that knowledge base with the agent and provide instructions describing its contents and when to query it. The agent includes these instructions in its prompt context to decide whether retrieval is appropriate for the user's request. Creating and populating the knowledge base alone does not establish this agent integration. Prepare the agent after changing its configuration before testing the retrieval behavior.

Trap Adding an action-group schema as the native knowledge-base integration, although action definitions describe operations and inputs rather than establishing the agent's knowledge-base association.

3 questions test this
Code interpretation lets a Bedrock agent execute generated code for analysis and calculations

When an existing Amazon Bedrock Agents Classic deployment must analyze uploaded files, produce visualizations, or perform calculations, enable code interpretation so the agent can generate and run code in a secure test environment. The agent can return results from actual execution rather than only generating code text. Enable Code Interpreter in the agent builder, then save and prepare the agent before testing the changed configuration.

Trap Using an action group's return-control mode as a managed code executor, although that mode sends the selected action and inputs back to application code for fulfillment.

3 questions test this

When knowledge-base queries need both meaning-based matching and raw-text matches, configure hybrid search on a supported vector store with a filterable text field. Semantic search uses vector embeddings alone. Verify the existing store and text-field configuration support hybrid retrieval instead of assuming every vector index can execute it.

Trap Adding a reranker as a substitute for raw-text retrieval when lexical candidates are missing, which only reorders the candidates already retrieved.

3 questions test this
Retrieve separates document retrieval from response generation

Use the Bedrock Knowledge Bases Retrieve operation when the application needs relevant source chunks but will manage generation itself. Use RetrieveAndGenerate when Bedrock should retrieve context and generate an answer with citations. This choice determines whether the managed knowledge-base call owns only retrieval or the combined retrieval-and-generation path.

Trap Calling Retrieve and expecting a synthesized answer with generated citations, which adds a generation responsibility that the retrieval-only operation does not perform.

3 questions test this
Reranking reorders retrieved candidates for relevance to the query

When retrieval finds candidate documents but their ordering is insufficient, configure a supported reranking model in the Bedrock knowledge-base query. The reranker assesses retrieved candidates for relevance before the selected context is used. It refines retrieval results rather than changing the generation model's sampling behavior.

Trap Lowering generation temperature to improve document ranking, which changes response sampling rather than the ordering of retrieved candidates.

3 questions test this
Metadata filters restrict which documents may satisfy a retrieval query

When answers must use documents from a specified department, date range, or category, apply a Bedrock knowledge-base metadata filter. The document metadata must be ingested and supported by the vector store. Filtering constrains the eligible results rather than merely requesting that the language model ignore unwanted sources after retrieval.

Trap Adding a department instruction only to the generation prompt, which does not constrain the documents returned by the retrieval query.

3 questions test this
A retrieval result limit is a maximum rather than a guaranteed result count

Bedrock knowledge-base retrieval returns up to the configured number of results. With hierarchical chunking, the limit counts retrieved child chunks, and children sharing a parent can be consolidated into the parent chunk in the response. Consequently, fewer final results can be correct behavior even when the requested limit is higher.

Trap Treating parent-chunk consolidation as missing indexed documents, which mistakes retrieval assembly for an ingestion failure.

3 questions test this
Query decomposition breaks a multifaceted question into retrieval subqueries

When one knowledge-base query combines multiple information needs, enable query decomposition to break it into smaller subqueries. Bedrock can execute several retrieval queries and use their results to form the final response. This addresses a broad or compound query rather than simply requesting more candidates for the unchanged query.

Trap Increasing the retrieval result limit as a substitute for separating multiple information needs, which still searches with the original compound query.

3 questions test this
Implicit filtering uses a metadata schema to derive filters from a query

When users express document constraints in natural language, Bedrock Knowledge Bases can use a supported model and a supplied metadata schema to generate retrieval filters. Describe the available metadata attributes so the model can map user intent to actual fields. Explicit filters remain appropriate when the application already knows the required filter values.

3 questions test this
Knowledge-base generation can use an explicitly selected guardrail version

When a RAG response path requires Bedrock Guardrails, configure the chosen guardrail identifier and version for knowledge-base response generation. This applies the specified controls to that generation path rather than relying only on prompt wording. Verify that the intended model and guardrail features are supported together.

Trap Adding safety instructions to a prompt as an equivalent to attaching the configured guardrail, which does not enable the managed guardrail controls.

3 questions test this

References

  1. https://docs.aws.amazon.com/sagemaker/latest/dg/hosting-faqs.html
  2. https://docs.aws.amazon.com/aws-certification/latest/machine-learning-engineer-associate-02/machine-learning-engineer-associate-02-domain3.html
  3. https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html
  4. https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints.html
  5. https://docs.aws.amazon.com/sagemaker/latest/dg/async-inference.html
  6. https://docs.aws.amazon.com/sagemaker/latest/dg/multi-model-endpoints.html
  7. https://docs.aws.amazon.com/sagemaker/latest/dg/multi-container-endpoints.html
  8. https://docs.aws.amazon.com/sagemaker/latest/dg/multi-container-direct.html
  9. https://docs.aws.amazon.com/sagemaker/latest/dg/triton.html
  10. https://docs.aws.amazon.com/sagemaker/latest/dg/deploy-model-advanced.html
  11. https://docs.aws.amazon.com/sagemaker/latest/dg/inference-pipelines.html
  12. https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deploy-models.html
  13. https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html
  14. https://docs.aws.amazon.com/sagemaker/latest/dg/invoke-multi-model-endpoint.html
  15. https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
  16. https://docs.aws.amazon.com/bedrock/latest/userguide/custom-model-import-prereq.html
  17. https://docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_on_EKS.html
  18. https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
  19. https://docs.aws.amazon.com/bedrock/latest/userguide/deploy-custom-model-on-demand.html
  20. https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference.html
  21. https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html
  22. https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles.html
  23. https://docs.aws.amazon.com/decision-guides/latest/decision-guides/bedrock-or-sagemaker.html
  24. https://docs.aws.amazon.com/sagemaker/latest/dg/jumpstart-foundation-models-use-studio-updated-deploy.html
  25. https://docs.aws.amazon.com/bedrock/latest/userguide/amazon-bedrock-marketplace.html
  26. https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-marketplace-deploy-a-model.html
  27. https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-marketplace-call-the-endpoint.html
  28. https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use-client-side.html
  29. https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
  30. https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
  31. https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html
  32. https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html
  33. https://docs.aws.amazon.com/bedrock/latest/userguide/agents-classic-maintenance-mode.html
  34. https://docs.aws.amazon.com/bedrock/latest/userguide/agents-kb-add.html
  35. https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html
  36. https://docs.aws.amazon.com/bedrock/latest/userguide/action-define.html
  37. https://docs.aws.amazon.com/bedrock/latest/userguide/action-handle.html
  38. https://docs.aws.amazon.com/bedrock/latest/userguide/agents-code-interpretation.html
  39. https://docs.aws.amazon.com/bedrock/latest/userguide/agents-enable-code-interpretation.html
  40. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html
  41. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-service-contract.html
  42. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-http-protocol-contract.html
  43. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-mcp-protocol-contract.html
  44. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html
  45. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-oauth.html
  46. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-outbound-auth.html
  47. https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-inbound-auth.html
  48. https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-retrieve.html
  49. https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-retrieve-generate.html
  50. https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
  51. https://docs.aws.amazon.com/bedrock/latest/userguide/kb-build-managed.html
  52. https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_KnowledgeBaseVectorSearchConfiguration.html
  53. https://docs.aws.amazon.com/bedrock/latest/userguide/rerank.html
  54. https://docs.aws.amazon.com/sagemaker/latest/dg/multi-model-support.html