What Happened
Four AWS implementation reports illustrate a practical principle for enterprise AI: match the serving architecture to the workload before optimizing models or buying more capacity. Scheduled predictions, interactive agents, coding assistants and long-running scientific inference have different latency, isolation and cost requirements. [1][2][3][4]
- Scheduled ML: GS Caltex separates model release from inference execution. Engineers approve models exported from SageMaker Canvas, then run a five-step pipeline every 30 minutes using SageMaker Batch Transform and S3 rather than a continuously running endpoint. The company reports deployment shrinking from about a week to a few hours, alongside lower inference costs. [1]
- Model routing: An experimental LiteLLM and NVIDIA NeMo Switchyard deployment routes coding-agent requests to Amazon Bedrock models. Its Stage router uses conversation history and recent tool activity to choose between efficient and capable models; a weighted Random router provides a comparison. Neither requires a judge model. [2]
- Interactive agents: Bedrock AgentCore Runtime V2 restores isolated session microVMs from snapshots. Moving suitable initialization before snapshot creation can reduce startup work, while session pre-warming can hide remaining latency. [3]
- Long-running inference: OpenFold3-preview is available through SageMaker JumpStart as a network-isolated asynchronous endpoint. Requests arrive through S3 and can run for up to one hour, making asynchronous execution more appropriate than an interactive request path. [4]
Why It Matters to Businesses
The lowest token or compute price is not necessarily the lowest business cost. A cheaper model that fails more tasks can increase retries and human review. Evaluate routing by tasks solved first, then cost per solved task—not token savings alone. [2]
Likewise, avoiding idle capacity has consequences. Scheduled batch execution introduces waiting time; scale-to-zero introduces startup delay; pre-warming improves perceived responsiveness but can allocate sessions for users who never submit a request. These are service-level decisions, not merely infrastructure settings. [1][3][4]
Governance can also accelerate delivery. The GS Caltex workflow lets process engineers develop models while ML engineers review preprocessing, approve model packages and control production deployment. Its reported improvement supports separating experimentation from release authority, rather than removing engineering review. [1]
Kimbodo Engineering Perspective
We would start with a workload contract: acceptable data age, first-response latency, completion deadline, quality threshold and sensitivity classification. That contract determines whether the application needs batch orchestration, an asynchronous queue, an interactive session runtime or a model gateway.
- Separate releases from runs. Register and approve a model version once; reuse that version across inference executions. Preserve preprocessing and feature order as part of the deployable artifact. [1]
- Treat routing as a quality-sensitive control plane. Compare against single-model baselines before adding routing complexity. A policy that works for one coding workload may not generalize to another. [2]
- Optimize the measured bottleneck. AgentCore’s platform overhead and application initialization require different remedies. Compare tail latency at realistic new-session rates before moving work into snapshots. [3]
- Keep expensive work off synchronous paths. Scientific inference needs durable job status and result retrieval, not an HTTP connection held open until completion. The OpenFold3 deployment provides an example of S3-backed asynchronous execution. [4]
We would not make every capability share one runtime. Shared identity, observability and policy controls are valuable; forcing every workload into the same execution model is not.
How We Would Implement It
1. Establish workload-specific execution paths
For periodic predictions, use EventBridge to trigger a SageMaker Pipeline that prepares S3 input, applies approved preprocessing, removes the target column, runs Batch Transform and assembles results. Add an execution ledger keyed by dataset window and model version to prevent duplicate or overlapping work. Validate a manual run before enabling the schedule. [1]
For long-running inference, expose a job-submission API that returns a job identifier. Store inputs and outputs in access-controlled S3 locations, invoke the asynchronous endpoint and maintain durable completion or failure status. Size concurrency using measured throughput and memory demand; OpenFold3’s larger supported instance can run four predictions concurrently with the appropriate configuration. [4]
2. Introduce routing behind a measured gateway
Deploy the experimental routing stack in a test environment first. Its reference architecture uses ECS Fargate in private subnets, an HTTPS Application Load Balancer and AWS WAF. Record the selected model from the response header and correlate it with task outcome, latency and actual spend. Promote routing only after repeated comparisons against single-model baselines. Confirm client compatibility: the gateway supports Chat Completions, not every API path. [2]
3. Optimize interactive session startup safely
For AgentCore V2, initialize static agents, clients, prompts and suitable small indexes before the first healthy response, within the 120-second initialization window. Create or refresh credentials, randomness, timestamps and changing tool state after restore. Use expiry-based session caches rather than assuming a snapshot remains current. [3]
Track time to first byte, platform overhead and estimated application time separately. Introduce a lightweight pre-warming action only where first-response targets justify unused-session costs, and tune idle timeouts accordingly. [3]
Risks, Costs and Security
- Unsafe evaluation environments: The routing example is not production-ready. Its benchmarks execute generated Python without sandboxing and retain potentially sensitive transcripts. Use a disposable, restricted environment with no production credentials or data. [2]
- Stale session state: Snapshots can preserve state that should not be reused. Refresh credentials and dynamic data after restore; account for sessions lasting up to eight hours. [3]
- Hidden operating costs: Include gateway infrastructure, logging, storage, pre-warmed sessions, retries and human review in cost models. Benchmark calls are billable, and scale-to-zero does not eliminate S3 charges. Verify estimates against billing. [2][3][4]
- Data and model integrity: Protect preprocessing artifacts, sequences, transcripts and predictions with least-privilege access and retention controls. Network isolation does not replace storage permissions or input validation. [1][2][4]
- Unproven output quality: OpenFold3’s documented example demonstrates a workflow and the benefit of supplied sequence alignments—not accuracy on novel targets. Confidence metrics should inform review, not substitute for domain validation. [4]
The production goal is the lowest verified cost of meeting the workload’s quality, latency and security requirements. Achieving that requires separate execution paths, explicit release controls and measurement at the task level—not a single universal AI endpoint.
Where Kimbodo Comes In
Kimbodo builds and operates this in production for businesses — see our AI Infrastructure & MLOps practice, or Estimate My Infrastructure.
Sources
- [1] Production MLOps at GS Caltex with Amazon SageMaker Canvas, part 1
- [2] Route coding agent requests to the right model on Amazon Bedrock with NVIDIA NeMo Switchyard
- [3] Architecture patterns for fast session startup on Amazon Bedrock AgentCore runtime
- [4] OpenFold3 on Amazon SageMaker JumpStart: Predict biomolecular structures