SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
Foundation Model Integration, Data Management, and Compliance

AIP-C01 Selecting and Configuring Foundation Models on AWS

24 min readAIP-C01 · Foundation Model Integration, Data Management, and ComplianceUpdated

Selecting and configuring foundation models (FMs) means choosing the model that fits a use case's capabilities, limits and lifecycle, wiring it in so it can be swapped without code changes, keeping it available through throttling and outages, and deploying and retiring customized models safely. This lesson covers AIP-C01 Task 1.2: capability filters and evaluation jobs on your own data, the Bedrock model lifecycle, the Converse API, AWS AppConfig and API Gateway provider abstraction, cross-Region inference profiles and their permissions, Step Functions circuit breakers and graceful degradation, cross-Region SageMaker AI deployment, LoRA adapters and Bedrock Custom Model Import, and SageMaker Model Registry pipelines with deployment guardrails and rollback.

What you’ll learn
  • Rule foundation models in or out by modality, context window, maximum output, features, Regional availability and lifecycle state, and compare the survivors with Bedrock evaluation jobs on your own prompts.
  • Explain what Legacy and end-of-life mean for new adoption, Provisioned Throughput, fine-tuning and access, and plan a model replacement before EOL.
  • Make model switching a configuration change with the Converse API, AWS AppConfig (validators, deployment strategies, the Lambda extension) and an API Gateway plus Lambda provider adapter.
  • Choose geographic or global cross-Region inference profiles and write the IAM policies and SCP conditions they need, and combine Provisioned Throughput with on-demand overflow.
  • Apply retries, Step Functions circuit breakers, graceful degradation and cross-Region SageMaker AI deployment to keep GenAI applications available.
  • Deploy customized models with LoRA adapter inference components or Bedrock Custom Model Import, and release, roll back and retire them with SageMaker Model Registry and deployment guardrails.

How do you choose a foundation model for a use case?

Choose a foundation model (FM) in two passes: first rule models in or out on hard capabilities and limitations, then compare the survivors on your own prompts. A public leaderboard rank or a low token price never rescues a model that cannot accept the input, cannot return the output in one response, or is about to be retired. Every Amazon Bedrock model has a model card (and a row in the supported-models tables) that lists the facts you filter on.

Hard filters from the model card

  • Input and output modalities. A workload that sends photos, scanned documents or audio needs a model that accepts that modality. A text-only model is out, however well it ranks.
  • Context window (maximum input tokens). The whole request has to fit: system instructions, retrieved or pasted documents, conversation history and the question. If a document must go in one request without chunking, the context window decides.
  • Maximum output tokens. A separate limit from the context window. Translation, rewriting and long-form generation produce output about as long as the input, so a model with a large context window can still stop partway through a long answer. Setting maxTokens higher than the model's documented maximum does not raise it.
  • Languages, features and API support: supported languages, tool use, system prompts, streaming, structured output, and whether the model works with the Converse API, batch inference, Knowledge Bases or Agents.
  • Regional availability and inference options: on demand in your Region, only through a cross-Region inference profile, or with Provisioned Throughput.
  • Lifecycle state: Active, Legacy or end of life (see the lifecycle section).

Telling the size limits apart

PropertyWhat it limitsSymptom when it is too small
Context windowTokens the model can read in one request (prompt + documents + history)The request is rejected as too long, or you are forced to chunk the input
Maximum output tokensTokens the model can generate in one responseResponses are cut off at the same point every time (stop reason shows the token limit)
Tokens-per-minute / requests-per-minute quotaThroughput for the account in a RegionThrottlingException under load; single requests still succeed
LatencyTime to first token and total response timeSlow responses, not truncated or rejected ones

When you see a symptom, map it to the limit that produces exactly that symptom: truncation is an output limit, rejection of a large input is the context window, and errors only at peak are a quota.

How do you compare shortlisted FMs on your own data?

Compare shortlisted models with Amazon Bedrock model evaluation jobs run over a prompt dataset taken from the real workload. Public benchmarks measure general skill on someone else's data; they cannot tell you which model follows your house format, your brand voice or your policy text. An evaluation job runs one model (or a response set you supply) over your prompts and reports metrics, so running one job per candidate gives a repeatable, side-by-side comparison with little or no custom code.

Evaluation typeHow outputs are scoredChoose it when
Automatic (programmatic)Built-in algorithmic metrics, many of which compare the output with a reference answer in the datasetYou have reference answers (for example, summaries written by experts) and want fast, cheap, repeatable scores
Model as a judge (LLM-as-a-judge)An evaluator model rates each response on metrics such as correctness, helpfulness, faithfulness or harmfulness, or on custom metrics you defineYou need qualitative judgements at scale and may have no reference answers
Human-basedRaters in a work team you manage, such as your own subject-matter experts, score outputs in a Bedrock-managed workflowQuality is subjective (brand voice, tone) or policy requires your own people to judge before a choice is made

Practical limits that shape the plan

  • A custom prompt dataset is a JSON Lines file in Amazon S3. For model-as-a-judge jobs it is capped at 1,000 prompts per job, so a larger question set is split across several jobs per candidate.
  • Human evaluation is the slowest and most expensive option; plan rater time and keep the prompt set to what your raters can review well.
  • Reference-based algorithmic metrics are meaningless without ground truth; a judge model or humans fill that gap.
  • Fine-tuning every candidate before choosing, or comparing only latency, answers a different question. Evaluate first, customize the winner later if needed.

Building a full evaluation system for production quality monitoring belongs to the evaluation and testing domain; here the job is narrow: pick the model that fits the use case.

How does the Bedrock model lifecycle affect choosing and retiring models?

Every Bedrock model is in one of three lifecycle states, and the state is a selection criterion as hard as modality or context size. Active models are fully supported. A Legacy model has an announced end-of-life (EOL) date and serves only customers who already use it. After EOL the model is removed and requests to it fail.

During the Legacy periodAllowed?
Existing users keep calling the model on demand until EOLYes
A new customer (an account that has not used the model) starts using itNo
Buy new Provisioned Throughput for the modelNo
Start new fine-tuning (customization) jobs on it as the base modelNo
Keep serving existing custom models built on it, including new on-demand deployments of those existing weightsYes, until EOL
Rely on uninterrupted access while the account goes unusedNo: access can lapse after about 15 days without use
Bedrock moves callers to a successor model automatically at EOLNo, never

What this means for selection

Do not adopt a Legacy model for a new application, even if it scored slightly higher: a new account cannot adopt it, cannot buy Provisioned Throughput for it, and would face a forced migration soon. A Legacy model is not a safe fallback either. Customized models share their base model's fate: once the base goes Legacy you cannot retrain on it, and the custom model is removed at EOL, so move a recurring fine-tuning cycle to an Active successor early and migrate once.

Retiring and replacing a model

  1. Watch for Legacy notices (console, model card, AWS Health / email) and record the EOL date.
  2. Shortlist Active replacements and run evaluation jobs on your own prompts, re-tuning prompts written for the old model.
  3. Roll the new model ID out gradually through configuration (AWS AppConfig) with alarm-based rollback.
  4. Finish well before EOL. Workloads that run only occasionally deserve special attention: access can lapse during an idle stretch long before the EOL date, so migrate them before their next scheduled run rather than waiting for it.

The EOL date is a hard stop for the model itself: no purchasing or routing option keeps a retired Bedrock model running, and proprietary model weights are never exported for you to host. The only durable answer is migrating to an Active model. The lifecycle documentation also describes an extended access stage late in the Legacy period, during which pricing can rise before EOL, which is one more reason to migrate early.

How does the Converse API make model switching a configuration change?

The Amazon Bedrock Converse API (Converse and ConverseStream) gives every supported model one request and response shape, so switching models becomes a change to the modelId parameter rather than a new code path. InvokeModel takes each provider's native JSON body, so supporting another provider means writing and maintaining another body format. Streaming (InvokeModelWithResponseStream), asynchronous invocation and inference profiles do not change the body format.

What Converse normalises

  • messages (conversation turns with text, image and document content blocks) and a system field for instructions.
  • inferenceConfig for the common parameters only: maxTokens, temperature, topP and stopSequences.
  • toolConfig for tool (function) definitions, with tool-use and tool-result blocks in the messages.
  • additionalModelRequestFields for model-specific parameters such as top_k, passed through to the provider.

Gotchas when you swap the model ID

  • Features are per model. The Converse supported-features table lists, per model, whether it supports system prompts, tool use, streaming tool use, document chat and vision. A request that uses a feature the model lacks fails with a validation error. Check the table when adopting a model; if a model lacks system prompts, a common workaround is to move the instructions into the first user message.
  • Model-specific fields go only to the model that accepts them. Putting top_k in inferenceConfig fails validation for every model, and sending it in additionalModelRequestFields to every model can cause validation errors on models that do not accept it. Keep per-model extra fields in configuration and attach them only for that model, so the request-building code stays shared.
  • A feature is a property of the model itself. Request parameters and routing wrappers change how a call is sent, not what the model can do, so the fix for an unsupported feature is a different model or a workaround in the request content.

How do you switch models without code changes using AWS AppConfig?

Keep the model ID, inference parameters and per-use-case routing in AWS AppConfig and read them at run time, so changing models is a configuration deployment that takes minutes, rolls out gradually and rolls back automatically. A model ID in a Lambda environment variable or in code needs a function update or a release, which is slow and has no built-in gradual exposure.

The AppConfig pieces

  • Configuration profile: a freeform document (JSON or YAML) or feature flags, stored in the AppConfig hosted store or in sources such as S3 or Parameter Store.
  • Validators on the profile, a JSON Schema or a Lambda function, reject malformed configuration (for example a mistyped model ID) before it is deployed.
  • Deployment strategies control blast radius: linear or exponential growth, a growth factor, deployment duration and a bake time. AppConfig watches CloudWatch alarms attached to the environment and rolls back automatically if one fires during deployment or bake time. An all-at-once strategy with an alarm still exposes every target before rollback.
  • Feature flags (multi-variant flags) can split a share of users between two models for an A/B comparison.

Reading configuration from Lambda

The AWS AppConfig Agent Lambda extension fetches and caches configuration and serves it to the function over a local HTTP endpoint, polling for new versions while the execution environment stays warm. It is tuned with environment variables, so no code changes are needed:

SettingWhat it controls
AWS_APPCONFIG_EXTENSION_POLL_INTERVAL_SECONDSHow often the extension checks for a new configuration (default 45 seconds); this bounds how long warm functions keep using an old value after a deployment
AWS_APPCONFIG_EXTENSION_POLL_TIMEOUT_MILLISThe timeout for a single fetch, not the refresh frequency
AWS_APPCONFIG_EXTENSION_PREFETCH_LISTConfigurations fetched when the extension starts, to speed up the first read

Near-twin alternatives

ApproachFast changeGradual exposureAutomatic rollback
AppConfig + Lambda extensionYesYes (deployment strategy)Yes (CloudWatch alarms)
Parameter Store read on each invocationYesNoNo
Parameter Store or S3 read only at cold startDelayed in warm environmentsNoNo
Environment variableNo (function update)NoNo
Lambda alias weighted trafficNeeds a new function versionYesOnly with CodeDeploy

How do you abstract model providers behind a stable API?

Put one stable API in front of every model provider, typically an Amazon API Gateway API backed by a Lambda adapter, so client applications call a single contract and the platform team can move a use case between Bedrock, a SageMaker AI endpoint or an external provider without client changes. Bedrock and SageMaker AI have different runtime APIs and payloads; if clients call providers directly, every switch is a client change.

  • The adapter maps each request (by use case, tenant or route) to the provider and model named in configuration, translates the payload, and normalises the response.
  • The mapping itself lives in AppConfig, read through the Lambda extension, so a provider switch is a configuration deployment, not an adapter redeployment.
  • Credentials for third-party providers (API keys) live in AWS Secrets Manager, read by the adapter at run time. An encrypted environment variable is still visible to anyone who can read the function configuration, and changing it needs a function update.
  • API Gateway adds authentication, usage plans and throttling per client in one place.

The test for any proposed abstraction is simple: does one component translate payloads between the client contract and each provider's API, and is the routing owned by the platform, not the client? DNS-level traffic splitting moves requests but leaves payload formats untouched, anything that hands provider choice to clients makes each switch a client change, and Bedrock-native constructs (such as inference profiles) only ever point at Bedrock models.

How does Amazon Bedrock cross-Region inference work?

Cross-Region inference lets you call a Bedrock model through an inference profile that routes each request from your source Region to one of several destination Regions, which raises available capacity and gives access to models that are not offered on demand in your Region. You invoke it by passing the profile ID (or ARN) as the modelId. Some models can be called on demand only through a profile; calling them by base model ID returns a validation error saying on-demand throughput is not supported and an inference profile should be used.

Geographic or global profile

Geographic profile (for example US, EU, APAC)Global profile
Where requests can be processedOnly Regions within that geographyAny supported commercial Region
Choose it forData residency rules such as "process only in EU Regions"No residency constraint; widest capacity for spikes and a lower on-demand price

Data stays in AWS's network, and the call is logged by CloudTrail in the source Region, with the Region that served it recorded in the event. You do not need to enable destination Regions in your account for routing to work.

Permissions

  • An identity policy that allows bedrock:InvokeModel on a geographic profile must also allow the foundation-model ARN in every Region the profile lists. Allowing only the profile, or only the local Region's model, leaves routed requests denied. A bedrock:InferenceProfileArn condition can limit those model ARNs to use through the profile, which keeps least privilege.
  • A global profile needs three resources: the profile ARN, the foundation model in the source Region, and the Region-less foundation-model ARN (arn:aws:bedrock:::foundation-model/...), whose requests carry an unspecified aws:RequestedRegion.
  • Service control policies that restrict aws:RequestedRegion must allow every destination Region of a geographic profile, and must allow unspecified for a global profile, or alternatively exempt Bedrock invocations made through specific inference profile ARNs (a condition on bedrock:InferenceProfileArn) so the Region restriction does not apply to them. An SCP deny cannot be overridden by any identity policy.

Profiles and Provisioned Throughput

Inference profiles, both system-defined and application inference profiles (which you create from a model or profile to add tags for cost tracking), do not support Provisioned Throughput. Provisioned Throughput is bought for a model in one Region and invoked through its own ARN. To combine a dedicated baseline with burst capacity, send the baseline to the Provisioned Throughput ARN and route overflow, such as throttled requests, through the cross-Region profile on demand in application logic.

How do you keep a GenAI application running during service disruptions?

Match the resilience pattern to the failure: retry brief, transient faults; use a circuit breaker to stop hammering a dependency that is down for minutes; degrade gracefully so users get something useful when no model answers; and deploy across Regions for Regional outages.

Failure patternPatternStep Functions building block
Throttling bursts that clear within seconds; the model must eventually process every itemRetry with exponential backoff and jitter, bounded attemptsRetry field with BackoffRate, JitterStrategy, MaxAttempts
Dependency failing for minutes; thousands of executions keep timing outCircuit breakerShared state in DynamoDB + a Choice state + fallback path
Item cannot be processed after retriesDead-letter handlingCatch field to a queue or error branch

Circuit breaker in AWS Step Functions

Each execution checks the circuit status in a shared store, normally a DynamoDB item, before the model task, and records failures after it. The circuit has three states: closed (call the model normally), open (after repeated failures, skip the model and take a fallback path, chosen by a Choice state), and half-open (after a cool-down, let a trial call through; success closes the circuit). Storing an expiry timestamp or TTL with the open state makes recovery automatic, with no operator reset. The state must be shared: execution input is private to one run, so concurrent executions would never agree. A circuit breaker is the wrong tool for faults that clear in seconds, because it diverts work long after the burst ends.

Graceful degradation

Graceful degradation serves a reduced but useful response instead of an error. Layer the fallbacks: a smaller or alternative model with a tight timeout; then non-generative results (approved FAQ answers, plain keyword search, a live-agent handoff); and keep core features working when the AI enhancement is skipped. Respect freshness rules: a cached generated answer is only a valid fallback for content that does not go stale; anything personal or real-time must come from its live source or not be shown. Unbounded retries and asynchronous replies break latency budgets.

Cross-Region deployment of custom models

Bedrock cross-Region inference covers Bedrock models only. A custom model on a SageMaker AI endpoint needs its own deployment in a second Region, created by the same release pipeline so both Regions run the same approved version, with Route 53 health-checked failover (or latency) records in front of the Regional APIs. SageMaker AI reads the model artifact from S3 and the container image from Amazon ECR in the Region where the model is created, so replicate the artifact bucket (S3 replication) and the image repository (ECR replication) to the second Region and point the second model at those copies. Extra production variants or Availability Zones stay inside one Region.

How do you deploy fine-tuned and LoRA-adapted models?

Deploy a customized model where its form and traffic pattern fit: Amazon SageMaker AI endpoints give full control and always-on capacity (including many LoRA adapters on one endpoint), while Amazon Bedrock Custom Model Import serves supported open-weight models on demand through Bedrock APIs with no instances to manage.

Parameter-efficient adaptation

Low-rank adaptation (LoRA) freezes the base model's weights and trains small low-rank matrices, an adapter, that adjust its behaviour. Because each adapter is small, one copy of the base model can be loaded once and many adapters attached to it. Full fine-tuned checkpoints, quantized copies and distilled student models are each complete models, so serving many of them means many copies in GPU memory.

Adapter inference components on SageMaker AI

  • Deploy the base model as an inference component on an endpoint, then each adapter as an adapter inference component that references the base component and a LoRA artifact in S3. Adapters share the base component's compute.
  • Clients choose the adapter per request by passing its InferenceComponentName to InvokeEndpoint, so many light, intermittent tenants or business units share one GPU fleet.
  • To release a retrained adapter, add it as a new adapter inference component and repoint that tenant's calls. The old component stays in place for a rollback in minutes, and the base and other adapters are untouched. The principle is isolation plus a rollback point: any change made in place, or made to a shared resource (the endpoint or the base component), either destroys the previous version or touches every tenant.
  • The advantage depends on sharing one loaded base model and choosing the adapter per request. Designs that load full merged copies multiply GPU memory, and traffic-splitting features route by percentage, not by tenant.

Bedrock Custom Model Import

  • Imports open-weight models of supported architectures (for example Llama, Mistral and others listed in the docs) that were fine-tuned elsewhere, such as in SageMaker AI training.
  • Input is an S3 location holding Hugging Face format files: .safetensors weights, config.json and tokenizer files. GGUF files, model.tar.gz archives with inference scripts and custom containers are SageMaker AI patterns and are not accepted.
  • The imported model is invoked through Bedrock runtime APIs on demand, billed for use, which suits sporadic traffic with the least operational overhead.
  • Bedrock may remove an imported model's copies after a period of inactivity; the next call returns ModelNotReadyException while it is restored. If even the first call after a quiet period must be fast, a SageMaker AI real-time endpoint that stays running is the reliable choice, at always-on cost.

Other hosting options and where they fall short

OptionWhat it isLimit for interactive LLM serving
SageMaker AI serverless inferenceInstances managed for you, scale to zero; provisioned concurrency keeps some capacity warm to avoid cold startsNo GPU support and a fixed memory ceiling, so it cannot hold a multi-billion-parameter LLM even with provisioned concurrency
SageMaker AI asynchronous inferenceRequests are queued, payloads and results go through S3, and the endpoint can scale to zero instancesBuilt for large payloads and long processing; a scaled-to-zero endpoint must start an instance first, so it does not meet a tight interactive latency target
Amazon Bedrock MarketplaceDeploys a public or provider model from the Marketplace catalog to managed endpoints on dedicated instances you chooseServes the catalog model's weights, not your own fine-tune, and its instances run (and bill) whether or not traffic arrives
SageMaker AI real-time endpointAlways-running instances, including GPU instancesConsistent low latency at always-on cost
NeedFit
Sporadic traffic, call alongside other Bedrock models, least operationsBedrock Custom Model Import
Strict latency on every call, including after idle periodsSageMaker AI real-time endpoint on a running GPU instance
Many per-tenant variants of one base modelLoRA adapters as SageMaker AI adapter inference components
Fine-tune a Bedrock-supported base model inside BedrockBedrock model customization (then serve the custom model on demand or with Provisioned Throughput)

How do you version, release and roll back customized models?

Version customized models in the SageMaker Model Registry, release them through an automated pipeline triggered by approval, and roll out each release with SageMaker AI deployment guardrails that roll back automatically on CloudWatch alarms.

Model Registry and approval-driven pipelines

  • A model package group holds the versions of one model; each model package version records its artifact, container and evaluation metrics.
  • Each version has an approval status: PendingManualApproval, Approved or Rejected. A reviewer approves a version before production.
  • A status change emits an Amazon EventBridge event, which can start the deployment pipeline (for example SageMaker Pipelines or CodePipeline) with no manual step.
  • Rollback through the registry: if the pipeline deploys the latest Approved version, setting the bad version to Rejected makes the previous version the latest Approved one and the status-change event redeploys it, while stopping later runs from picking the bad version again. Manual changes made outside the pipeline do not change what the pipeline considers current, so they are undone the next time it deploys.

Deployment guardrails

ModeHow traffic movesBest for
Blue/green, all at onceNew fleet is provisioned, then all traffic shifts in one step, followed by a baking periodSimple releases with spare capacity
Blue/green, canaryA small slice first, a wait while alarms are watched, then the rest in one stepCatching faults that show up at any traffic level, with few requests exposed
Blue/green, linearEqual steps with a wait after eachLoad-dependent faults that appear only at a larger share of traffic
RollingInstances replaced batch by batch; only one batch of extra capacity is needed, not a second full fleetLarge models on scarce GPU instances, when a second full fleet will not fit quota or capacity

All modes accept CloudWatch alarms in the auto-rollback configuration: if an alarm fires during the shift or baking period, SageMaker AI returns traffic to the old fleet. Blue/green always provisions a complete new fleet first; rolling updates provision only one batch at a time. A canary waits longer but still jumps from a small slice to everything, so it cannot reveal a fault that appears only at, say, half load; linear steps can.

Lifecycle management

Retiring a model is the last step of the same lifecycle: register the replacement, evaluate it against the incumbent, approve it, deploy it with guardrails, keep the previous version available for rollback, then delete the old endpoint or inference component and archive or reject the old registry version. For Bedrock-hosted models, follow the Legacy-to-EOL steps in the lifecycle section.

Tip. Task 1.2 questions are production scenarios about a team's GenAI application that state several requirements at once, such as EU-only processing plus on-demand pricing, no client or code changes plus fast switching, or gradual rollout plus no spare GPU capacity, and each option is a real AWS pattern that misses one of them. Expect symptom-led items (responses cut off at the same point, AccessDeniedException after moving to an inference profile, a validation error after swapping a model ID in Converse, old configuration served for a short time after a deployment) that ask for the root-cause fix, and selection items that hinge on one card property or a lifecycle rule. Qualifiers such as LEAST operational overhead, MOST cost-effective, least privilege and fewest requests affected decide between near-twins: geographic versus global profiles, canary versus linear versus rolling deployments, retry versus circuit breaker, Custom Model Import versus a SageMaker AI endpoint, and AppConfig versus environment variables or Parameter Store. A good share are Select TWO, pairing two controls for two separate needs.

Key takeaways
  • Filter before you benchmark: modality, context window, maximum output, features, Region and lifecycle state rule models out; only then compare candidates on your own prompts.
  • Context window limits what the model reads, maximum output limits what it writes, and quotas limit throughput: truncation, rejection and throttling point to different limits.
  • Bedrock evaluation jobs compare candidates on your data: automatic metrics need reference answers, model-as-a-judge works without them, human jobs put your own raters in the loop.
  • Legacy models take no new customers, no new Provisioned Throughput and no new fine-tuning; idle access can lapse; after EOL calls fail and nothing migrates you automatically.
  • Converse makes a model switch a model-ID change, but features such as tool use and system prompts are per model, and model-specific fields go only in additionalModelRequestFields for that model.
  • AppConfig gives fast, validated, gradual model changes with alarm rollback; the Lambda extension's poll interval sets how quickly warm functions see them.
  • An API Gateway plus Lambda adapter, with routing in AppConfig and keys in Secrets Manager, lets providers change without client changes.
  • Geographic profiles keep data in a geography; global profiles widen capacity and lower price. Allow the model in every listed Region, allow destination Regions (or unspecified for global) in SCPs, and remember profiles take no Provisioned Throughput.
  • Retry transient faults, break the circuit on sustained ones with shared DynamoDB state and a half-open trial, and degrade to a smaller model or non-generative answers rather than failing.
  • LoRA adapters share one base model as adapter inference components; Custom Model Import serves Hugging Face safetensors on demand; Model Registry approval drives the pipeline, and guardrails (canary, linear, rolling) roll back on alarms.

Frequently asked questions

What is the difference between a model's context window and its maximum output tokens?

The context window is the maximum number of tokens a foundation model can read in one request, including instructions, documents, conversation history and the question. Maximum output tokens is a separate limit on how many tokens the model can generate in one response. A model can accept a long document yet still cut off a long answer such as a full translation, so tasks with long outputs must be checked against the output limit, not just the context window.

What happens when an Amazon Bedrock model becomes Legacy?

A Legacy Bedrock model has a published end-of-life date. Until then, existing users can keep calling it, but new customers cannot adopt it, no new Provisioned Throughput can be bought and no new fine-tuning jobs can use it as a base model. Access can also lapse if the account does not use the model for about 15 days. After EOL the model is removed and requests fail, and Bedrock does not move callers to a successor, so teams must evaluate and switch to an Active model themselves.

How do I switch Amazon Bedrock models without changing code?

Call models through the Converse API, which uses one request format for all supported models, and read the model ID and inference parameters from AWS AppConfig through the AppConfig Lambda extension. A model change then becomes a configuration deployment that can be validated with a JSON Schema, rolled out gradually and rolled back automatically by a CloudWatch alarm. Check the Converse supported-features table, because tool use and system prompts vary by model.

When should I use a global instead of a geographic cross-Region inference profile?

Use a geographic inference profile, such as the US or EU profile, when requests must be processed only within one geography for data residency. Use a global inference profile when there is no residency constraint and you want the widest pool of capacity for traffic spikes and a lower on-demand price. A global profile needs extra permissions: the Region-less foundation-model ARN in the identity policy and an SCP that allows an unspecified aws:RequestedRegion.

Why does cross-Region inference fail with AccessDeniedException?

Cross-Region inference is denied when a policy does not cover every place a request can go. The identity policy must allow the inference profile and the foundation model in each Region the profile lists, and a service control policy that restricts aws:RequestedRegion must allow every destination Region of a geographic profile, or the value unspecified for a global profile. An identity policy can never override an SCP deny, and destination Regions do not need to be enabled in the account.

How does a circuit breaker work in AWS Step Functions?

A Step Functions circuit breaker keeps the health of a dependency, such as a model endpoint, in a shared DynamoDB item that every execution reads before calling it. After repeated failures the circuit opens and a Choice state sends work to a fallback, such as a smaller model. After a cool-down, set by an expiry timestamp, the circuit becomes half-open and a trial call is allowed; if it succeeds the circuit closes. For throttling that clears in seconds, a Retry with backoff and jitter is the better fit.

How do you serve many LoRA adapters on one SageMaker AI endpoint?

Deploy the base model once as an inference component and each LoRA adapter as an adapter inference component that references the base component and an adapter artifact in Amazon S3. The adapters share the base component's GPU compute, and each request picks its adapter by passing the adapter's InferenceComponentName to InvokeEndpoint. A retrained adapter can be added as a new component and switched to independently, keeping the old one for rollback.

What format does Amazon Bedrock Custom Model Import need?

Bedrock Custom Model Import reads a model of a supported open-weight architecture from Amazon S3 in Hugging Face format: safetensors weight files, config.json and the tokenizer files. GGUF files, model.tar.gz archives with inference scripts and custom containers are not accepted. The imported model is invoked on demand through Bedrock runtime APIs, and a model that has been inactive may return ModelNotReadyException while Bedrock restores it.

Source

This lesson covers the "Foundation Model Integration, Data Management, and Compliance" domain of the official AIP-C01 exam guide. Vendors revise their guides — check the source for the current version.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?