Skip to lesson

AWSAWS Certified Generative AI Developer - Professional2026-104.2 Optimize application performance

Prove optimized inference earns its place

Completed by the knowledge check

Learning objective

Benchmark latency-optimized Amazon Bedrock inference against quality, price, and supported-model constraints.

For an architect selecting an interactive inference route, the outcome is a controlled comparison that proves whether optimization improves accepted responses within your operating constraints. See 1.2.2 for the broader benchmark contract and 1.2.4 for processing-location boundaries.

Core idea

Latency-optimized inference is a selectable Bedrock execution mode for supported models and inference profiles. It is not an instruction to generate a shorter answer, a model-routing policy, or a guarantee that every request receives optimized service.

Compare standard and optimized requests with equivalent inputs, generation settings, and acceptance criteria. Record the mode actually served, because AWS documents fallback to standard inference when the model’s latency-optimization usage quota is reached.

A valid decision combines faster useful output, complete-response latency, task quality, and cost per accepted result. A low latency measurement for a rejected answer does not justify adopting the route.

How it works

Gate the candidate by documented support

The AWS latency-optimized inference page identifies the feature as a preview release. Plan for preview terms: the feature is subject to change.

The page’s supported-model table lists these exact model versions:

ModelModel IDSource Regions listed for supporting cross-Region profiles
Amazon Nova Proamazon.nova-pro-v1:0us-east-1, us-east-2
Anthropic Claude 3.5 Haikuanthropic.claude-3-5-haiku-20241022-v1:0us-east-2, us-west-2
Meta Llama 3.1 405B Instructmeta.llama3-1-405b-instruct-v1:0us-east-2
Meta Llama 3.1 70B Instructmeta.llama3-1-70b-instruct-v1:0us-east-2, us-west-2

Do not generalize those names to every model in the family. The page’s Region prose and its inference-profile table differ for Nova Pro and Llama 3.1 405B. The table is the explicit profile list reproduced here; verify the intended profile and source Region before deployment rather than infer additional combinations from the prose.

Source Region is also not a statement that processing remains within that one Region. The documented capability uses cross-Region inference. Apply the processing-boundary checks in 1.2.4 before including a route in the benchmark.

For Llama 3.1 405B, AWS documents optimized requests with a total input and output token count up to 11K. Larger requests fall back to standard mode. This is an optimized-mode constraint, not the model’s general context-window definition. Include requests around that boundary if the workload can reach it.

Request and observe the execution mode

For ConverseStream, request the mode in performanceConfig.latency with the value optimized or standard. The stream’s metadata includes performanceConfig.latency, which lets the caller record the served configuration.

The Invoke interface uses a different field name: InvokeModel.performanceConfigLatency. Its valid values are also standard and optimized, and the response includes the performance configuration through X-Amzn-Bedrock-PerformanceConfig-Latency. Do not put a Converse request object’s field into an Invoke request merely because the feature has the same name.

AWS states that standard is the default mode. When the optimized usage quota is reached, Bedrock attempts to serve the request with standard latency and charges standard latency rates for that request. The served configuration is also visible in AWS CloudTrail logs.

Separate requested mode from served mode in every measurement. Otherwise, an “optimized” experiment can contain standard-served requests, hiding both the benefit when optimization is available and the risk when it is unavailable.

Hold quality and workload constant

Use the same representative prompts, authorized evidence, output limits, and acceptance rubric in both arms. Keep the model version and approved profile route comparable. Interleave or randomize the runs so a change in traffic conditions does not align entirely with one arm.

Record TimeToFirstToken for streaming requests and InvocationLatency for completion in the AWS/Bedrock namespace. Add application time to first displayed content and end-to-end accepted completion; service improvements can be diluted by retrieval or client delivery.

AWS also documents metrics for latency-optimized requests in CloudWatch logs under model-id+latency-optimized. Use that view alongside the per-request served configuration to separate the optimized cohort from standard-served requests.

Collect InputTokenCount and OutputTokenCount, or per-request stream usage, to distinguish faster execution from different token volume. Compare p50 and p95 by prompt size, response size, and task class. Keep standard-served fallback requests visible as their own cohort.

Evaluate the same business properties as the baseline: correct answer, required evidence, valid structure, and safe terminal outcome. AWS describes the feature as reducing latency without compromising accuracy, but your application’s quality gate still needs representative evidence. Do not substitute a vendor performance claim for your own acceptance test.

Price the delivered outcome

Use the Bedrock pricing page for the chosen model, Region, and inference mode. Record the rate basis in the benchmark evidence rather than invent one universal optimized-inference premium. A quoted rate without its model and charging unit is not a usable comparison.

Apply the appropriate rates to observed usage and served mode. Include rejected responses and retry attempts in the cost numerator. Divide by accepted complete results, not just invocations, when comparing economic value. See 4.1.1 for attribution across attempts.

Assess both normal availability and fallback operation. If standard-served requests violate the application deadline, an average benefit under available optimized quota is insufficient. Set an application response policy for that condition rather than treat the optimized parameter as reserved capacity.

Key distinctions and trade-offs

Requested versus served mode: optimized expresses the requested configuration. The response configuration identifies the service mode that should label the observation.

Lower latency versus unchanged quality: An execution-mode comparison still requires the same task acceptance rubric.

Supported profile versus model-family branding: Support belongs to the documented model version and route, not every similarly named model.

Per-token price versus accepted-result cost: Smaller outputs, retries, and rejected answers change economics even when rate cards stay constant.

Preview status and documented fallback add operating uncertainty. Adoption can still be justified when the measured gain matters and the standard-mode behavior remains acceptable. A hard deadline that requires optimization on every request needs a stronger capacity and fallback decision.

Architecture / decision scenario

A support team evaluates Claude 3.5 Haiku through a documented supporting US cross-Region profile. Its standard route meets answer-quality requirements but has a slow p95 initial response.

The team sends matched requests with performanceConfig.latency set to standard and optimized. It records the returned mode, token usage, first displayed text, complete response time, and reviewed answer acceptance. It calculates cost per accepted result using the selected pricing basis.

An additional stress cohort includes standard-served fallback. The team adopts optimization only if quality remains acceptable, the observed latency benefit survives the complete application path, and fallback still fits the response policy. It excludes unsupported model versions and unapproved processing routes before interpreting the benchmark.

Common exam traps

  • Treating latency-optimized inference as generally available.
  • Assuming every Bedrock model supports optimized.
  • Using performanceConfig.latency as the Invoke field name.
  • Labeling results by requested mode without checking served mode.
  • Mistaking the 405B 11K optimized-mode limit for its general context window.
  • Assuming optimized quota exhaustion always rejects the request.

What to remember

  • Gate model version, profile, source Region, and processing policy first.
  • Compare equivalent standard and optimized requests.
  • Record the mode actually served and preserve fallback cohorts.
  • Require quality acceptance and cost per accepted complete result.
  • Plan for standard-mode operation under optimized constraints.

Knowledge check

References