AwsIntermediate

Bedrock Model Gateway: Bring Your Own Model to AWS

DeveloperHat Team
15 min read

TL;DR

AWS sells no product called Bedrock Model Gateway — it is a pattern. The honest guide to the three real ways to bring your own model onto Bedrock.

If you have a model of your own — a fine-tuned Llama, a Qwen trained on your own data, a checkpoint your team has been serving from a GPU box — and you want it on AWS managed infrastructure, the question you will actually type into a search box is "Bedrock Model Gateway". The answer is three real paths and one routing layer, and getting them straight saves you from designing around a product that does not exist.

One correction before anything else, because the naming shapes every decision that follows: AWS sells no product literally named "Bedrock Model Gateway". "Model gateway" is an architecture pattern — one interface in front of many models, handling routing, fallback, rate limiting, token metering and caching. AWS's own architecture blog puts it plainly: "On AWS, Amazon Bedrock is that gateway". This article is the honest bring-your-own-model decision guide: the three real ways to bring your own model onto Bedrock's managed infrastructure, plus the routing layer that sits in front of them.

YOUR APP One client call Converse API / InvokeModel One endpoint no per-model wiring One auth model IAM or JWT GATEWAY LAYER Routing rules cost, latency, capability Fallback chain backup model on 429 / 5xx Rate limits + Guardrails token metering, screening MODELS BEHIND IT Foundation models Nova, Claude, GPT… Imported open weights Llama, Qwen, Mistral… Fine-tuned models your weights, Bedrock APIs One interface in front of many models: the client never learns which model answered.

What a model gateway actually does

Strip away the marketing and a model gateway does five jobs. It routes: a request goes to the model that fits it best by cost, latency or capability. It falls back: when the primary model throttles or fails, the request goes to a backup instead of failing in front of the user. It rate limits: per-team or per-application token budgets so one workload cannot starve the rest. It meters: every token is counted against a team, a feature or a customer, which is what makes chargeback possible. And it caches: repeated prompt prefixes are served at a fraction of a fresh run's cost, which is where prompt caching earns its keep.

Bedrock already does most of the gateway job for the models it hosts. One API shape — the Converse API — works across the foundation models in the catalogue, and, as this article shows, across your own imported and fine-tuned models too. The gateway question is therefore not "which product do I buy" but "which of the three paths puts my model behind that one interface".

AWS Prescriptive Guidance frames the choice at a higher level, naming two model-access patterns: cloud native, where you consume models through Bedrock or SageMaker, and LLM gateway, where a central layer fronts Bedrock, SageMaker and third-party providers with unified usage tracking, cost management, rate limiting, routing and governance — the AWS Guidance for Multi-Provider Generative AI Gateway reference architecture. If all your models live on Bedrock, the cloud-native pattern is usually enough. The gateway pattern earns its keep the moment a third-party provider enters the picture, or the moment finance asks who spent what and you have no answer.

The three paths, and the gateway layer

There are exactly three ways to bring your own model onto Bedrock's managed infrastructure. They differ in one thing: what you already have. A set of weights you trained elsewhere, a base model plus training data, or nothing at all. Pick the path by the asset, not by the logo.

Three ways onto Bedrock infrastructure — one gateway in front Path 1 — Custom Model Import: your weights, Safetensors, from S3 Path 2 — Fine-tune in place: supervised + reinforcement, no deploy step Path 3 — Managed open weights: serverless, OpenAI-compatible, no import Gateway layer — AgentCore Gateway: routing, fallback, rate limits Your client — one endpoint, one API shape, every model behind it The three paths differ in who owns the weights; the gateway is the same in front of all of them.

Path 1: Custom Model Import — you have the weights

Custom Model Import is generally available, and it is the path for teams that already have a fine-tuned model. You import a fine-tuned open-source model into Bedrock and call it through the same APIs as any foundation model. The import source is Amazon S3, through an import job run from the console or the API. Once imported, the model gets on-demand throughput and works with InvokeModel, InvokeModelWithResponseStream and the Converse API — the same calls your application already makes.

The supported architectures are spelled out in the AWS documentation, and the list is worth reading in full before you plan anything: Llama 2, 3, 3.1, 3.2 and 3.3, Mllama, Mistral, Mixtral, Flan, Qwen2, Qwen2.5 and Qwen3 including the VL variants, GPT-OSS 20B and 120B, GPTBigCode and Granite. If your model is not in that list, this path is closed to you today, and no amount of clever packaging changes that. Check the list first; it is the cheapest decision in this whole article.

Models must be in Safetensors format. The required files are the Safetensors weight files, a config JSON, tokenizer_config.json, tokenizer.json and tokenizer.model. That file list is the practical filter most teams trip over: a checkpoint saved in an older format, or a tokenizer saved without the full set of files, will not import, and the error will arrive after the upload rather than before it. Get the files right in S3 before you start the job.

There are three patterns the documentation names: a fine-tuned model, an adaptation of a base model, and a pretrained model built from scratch. The first two are the common cases — a team that fine-tuned Llama or Qwen on its own data and wants managed inference for it.

The limits are real and worth stating plainly. Imported models are supported in four regions: eu-central-1, us-east-1, us-east-2 and us-west-2. If your workloads live in another region, this path does not reach them. Imported models are not compatible with Batch inference, and they are not compatible with CloudFormation — you cannot declare an imported model in a template and have it appear. And the licence is your problem: AWS documentation notes, "Make sure that your import and use of the models in Amazon Bedrock complies with the terms or licenses applicable to the models." Open weights are not public domain. The licence of the base model travels with the weights, and importing them into a managed service does not change that.

The import itself is one API call. The shape below is the documented CreateModelImportJob call: a name for the imported model, an S3 data source pointing at the model files, and an IAM role that Bedrock assumes to read them.

import boto3

bedrock = boto3.client("bedrock", region_name="us-east-1")

response = bedrock.create_model_import_job(
    importedModelName="my-qwen3-support-model",
    modelDataSource={
        "s3DataSource": {
            "s3Uri": "s3://my-model-bucket/qwen3-fine-tuned/"
        }
    },
    roleArn="arn:aws:iam::123456789012:role/BedrockModelImportRole",
)

print(response["jobArn"])

Once the job completes, the imported model is just another model ARN, and calling it looks exactly like calling any Bedrock model through the Converse API:

import boto3

client = boto3.client("bedrock-runtime", region_name="us-east-1")

response = client.converse(
    modelId="arn:aws:bedrock:us-east-1:123456789012:imported-model/my-qwen3-support-model",
    messages=[
        {"role": "user", "content": [{"text": "Summarise this ticket in two sentences."}]}
    ],
)

print(response["output"]["message"]["content"][0]["text"])

That sameness is the whole point. Your application code, your logging, your Guardrails configuration and your token metering all work unchanged, because the imported model speaks the same API as everything else behind the gateway.

Path 2: Fine-tune in place — you have a base model and data

If you do not have weights yet, but you have training data and a base model you want specialised, Bedrock fine-tuning in place is the second path. Bedrock offers supervised fine-tuning plus reinforcement fine-tuning, and the model stays inside Bedrock throughout — there is no export, no S3 upload of weights, no import job.

The recent change that matters here landed on February 17, 2026, when AWS extended reinforcement fine-tuning to open-weight models — Qwen3-32B and GPT-OSS-20B — with OpenAI-compatible APIs, the Responses API and the Chat Completions API. After fine-tuning, the model is immediately usable for on-demand inference with no extra deployment step. That last detail is the one teams used to SageMaker will notice most: there is no endpoint to create, no instance type to pick, no deployment to wait for. The fine-tuned model is ready when the job finishes.

It is also worth being clear about what fine-tuning is not. It does not teach a model facts it has never seen in any durable way, and it does not fix a model that is wrong for the task. If the base model cannot do the job at all, a bigger base model or a different approach — retrieval, a different model family — is the answer, not more epochs. The cheapest fine-tuning run is the one you skip after an honest eval.

Path 3: Managed open weights — you have nothing yet

The third path is for the team that has no weights and no training data to speak of, and just needs a good open-weight model running on managed infrastructure. On February 10, 2026, AWS added six fully-managed open-weights models to Bedrock: DeepSeek V3.2, MiniMax M2.1, GLM 4.7, GLM 4.7 Flash, Kimi K2.5 and Qwen3 Coder Next. They are powered by Project Mantle, they run as serverless inference, and they are OpenAI API-compatible.

This path is also the right default for the team that is not sure it needs a custom model at all. Most teams that think they need fine-tuning would be better served by a strong managed model plus good retrieval and a good prompt, and the managed open-weights catalogue is the cheapest place to find that out. The decision to invest in custom weights should come after an eval shows the managed model falling short, not before.

The gateway layer: Bedrock AgentCore Gateway

Whichever path puts your model on Bedrock, you still need the routing layer — the part that decides which model answers, and what happens when it cannot. That layer is Bedrock AgentCore Gateway, whose Bedrock InvokeModel support — including model fallback — landed on October 22, 2026.

AgentCore Gateway is the routing layer in front of your models. Its inference endpoint speaks the Bedrock InvokeModel API, so the client only changes its endpoint — the request shape stays the same. Rules reroute a request to a backup model on throttle or unavailability, with a fallback chain of up to two backup destinations plus a circuit breaker. Inbound authentication is via IAM or JWT. Token rate limits cap how much any one caller can consume, and Guardrails prompt screening runs on the way in.

The design is deliberately boring, and that is a compliment. A gateway that requires every client to learn a new API is a gateway nobody adopts. AgentCore Gateway asks for an endpoint change and gives you routing, fallback, auth and metering in return. Teams that built their own routing on Lambda's new execution models know how quickly that logic grows, and a managed gateway is the way to stop maintaining it. It is for the team that has more than one model behind the interface and more than one caller in front of it. If you have a single model and a single application, the gateway is overhead you do not need yet. The moment a second model or a second team arrives, the gateway is the cheapest place to put the rules, because the alternative is the same logic copied into every client, drifting apart with every release.

Two pitfalls deserve attention, because they are the kind of thing you discover in production at 2 a.m. First, throttling — a 429 response — does not trigger a fallback unless explicitly configured. The default is to hand the throttle back to the caller. If you want fallback on throttle, configure it; do not assume it. Second, backup models must understand the same payload schema. A fallback to a model that expects a different request shape is not a fallback, it is a different error. Test the fallback path with real traffic shapes before you need it.

The three paths, head to head

Custom Model Import gives you the most control over the weights: they are yours, trained where you trained them, served by Bedrock. The cost is the work before the import — training, packaging into Safetensors, getting the tokenizer files right — and the regional and feature limits: four regions, no Batch inference, no CloudFormation. It is the right choice when the weights already exist and are the asset.

Fine-tuning in place gives you a custom model without the training infrastructure. The cost is the training time inside Bedrock and the discipline of evaluation — a tuned model that nobody measured is a liability. It is the right choice when the data is the asset and the weights do not exist yet.

Managed open weights give you speed: a model running in minutes with nothing to build. The cost is the least control over the weights themselves. It is the right choice when you are still finding out whether a custom model is needed at all, and it is the right default for most teams most of the time.

Pick the path by what you already have What do you have? start from the asset Fine-tuned weights already trained elsewhere A base model + data you need it specialised Nothing yet just need a good model Custom Model Import S3 import, Converse API Fine-tune in Bedrock supervised or RL Managed open weights serverless, no import Whichever path you take, put the gateway in front — routing and fallback are cheaper there than in every client.

Recommendation

Put AgentCore Gateway in front from the start, even if you begin with a single model. The endpoint change is cheap now and expensive later, and the first time a model throttles in production you will want the fallback chain to already exist rather than to be a ticket in the backlog. Configure the 429 fallback explicitly, test the backup models with real payloads, and set token rate limits per caller before the first surprise bill, not after it. If you are still choosing between models, compare them on cost, not benchmark scores alone — our frontier model selection guide for 2026 walks through the comparison that survives contact with a real invoice.

Architecture Decision

Decision: Bring our own model onto Bedrock through the managed open-weights catalogue first, fine-tune in place when evals prove the gap, and import existing weights only when we already hold them — all behind an AgentCore Gateway with an explicit 429 fallback.

Context: The team needs a custom or open-weight model on AWS managed infrastructure, without operating GPU servers. AWS sells no product named "Bedrock Model Gateway"; the gateway is a pattern, and Bedrock plus AgentCore Gateway provide it.

Options considered: Custom Model Import from S3; fine-tuning in Bedrock with supervised and reinforcement methods; fully-managed open-weights models; SageMaker endpoints; self-hosted inference on our own GPUs.

Why this one: Every Bedrock path ends behind the same Converse API, so the choice is reversible by changing a model identifier. The managed catalogue is the fastest honest eval, fine-tuning in place has no deployment step, and the import path reuses weights we already own. AgentCore Gateway adds routing and fallback for an endpoint change.

What it costs you: Four-region support and no Batch inference or CloudFormation for imported models; the gateway needs explicit 429 fallback configuration and backup models that share the payload schema; fine-tuning quality is bounded by training data quality.

When to reverse it: If the workload needs a region outside eu-central-1, us-east-1, us-east-2 or us-west-2; if Batch inference or CloudFormation-managed models become a hard requirement; or if the model architecture we need is not in the Custom Model Import support list — at which point a SageMaker endpoint or self-hosted serving is the honest answer.

When NOT to use this

Do not build a model gateway when you have one model and one caller. The routing, fallback and metering are real code with real failure modes, and a single-model application does not need them. A direct Bedrock call is simpler and easier to debug. Add the gateway when the second model or the second team arrives.

Do not import a model whose licence you have not read. Open weights carry licence terms, and Bedrock's documentation is explicit that compliance with those terms is your responsibility. A model that is free to download is not necessarily free to serve commercially, and discovering that after launch is a legal problem, not a technical one.

Do not put a model behind the gateway if your real constraint is data residency. If the data must stay inside your own building, a managed service in an AWS region does not satisfy that, whatever the gateway in front of it. That is the problem AWS AI Factories are built for — managed infrastructure inside your own data center — and no amount of gateway configuration changes where the inference runs. And do not treat the gateway as a substitute for evaluation. Routing between models only helps if you know which model is better for which request, and that knowledge comes from measuring on your real traffic. A gateway with untested fallback models is a more complicated way to fail.

The honest summary is short. There is no product called Bedrock Model Gateway, and you do not need one. There are three real paths to bring your own model onto Bedrock — import the weights you have, fine-tune the model you need, or use a managed open-weight model as it stands — and one routing layer, AgentCore Gateway, to put in front of them. Pick the path by what you already hold, measure before you invest in custom weights, and configure the fallback before production teaches you why.

Sources

  • Custom Model Import — Amazon Bedrock documentation
  • Amazon Bedrock adds support for six open-weights models — AWS What's New, February 10, 2026
  • Amazon Bedrock reinforcement fine-tuning with OpenAI-compatible APIs — AWS What's New, February 17, 2026
  • Set up Bedrock model fallback with AgentCore Gateway — dev.to
  • Inside an enterprise AI agent: a governed, observable loop architecture — AWS Architecture Blog
  • Why This Matters

    Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

    Trade-offs to Consider

    Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

    When NOT to Use This

    Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

    Decision Framework

    Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

    Share this articleShare on XShare on LinkedIn

    Keep the decision frameworks coming

    One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.