Streamlining Custom LLM Deployment with Serverless Infrastructure

salesforce · Tech · 2025 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Custom LLM deployment infrastructure for agentic AI applications

Salesforce's AI platform team needed to reduce the operational overhead and cost of deploying fine-tuned Llama, Qwen, and Mistral models for Agentforce while preserving existing production interfaces and scalability.

Constraints:

Architecture

Salesforce added Amazon Bedrock Custom Model Import to its existing CI/CD model pipeline. CI/CD saves model artifacts to S3, Bedrock imports models through a unified API, and inference clients keep calling existing SageMaker-style endpoints through lightweight CPU proxy containers that preserve preprocessing, postprocessing, monitoring, and logging while forwarding GPU-intensive inference to Bedrock serverless endpoints.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  ci_cd_model_pipeline["CI/CD model pipeline"] --> s3_model_store["S3 model store"]
  ci_cd_model_pipeline --> bedrock_custom_model_import_api["Bedrock Custom Model Import API"]
  s3_model_store --> bedrock_custom_model_import_api
  iam_and_cross_account_access["IAM and cross-account access"] --> s3_model_store
  bedrock_custom_model_import_api --> amazon_bedrock_serverless_inference["Amazon Bedrock serverless inference"]
  prediction_service_clients["Prediction service clients"] --> sagemaker_cpu_proxy_containers["SageMaker CPU proxy containers"]
  sagemaker_cpu_proxy_containers --> amazon_bedrock_serverless_inference
  iam_and_cross_account_access --> amazon_bedrock_serverless_inference
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
CI/CD model pipeline Builds model artifacts and saves them into the model store. S3 model store, Bedrock Custom Model Import API
S3 model store Stores customized model artifacts for import by Amazon Bedrock. CI/CD model pipeline, Bedrock Custom Model Import API
Bedrock Custom Model Import API Registers customized LLMs and lets Bedrock pull model artifacts from S3. CI/CD model pipeline, S3 model store, Amazon Bedrock serverless inference
Prediction service clients Existing downstream applications and Agentforce workloads that call the established serving interface. SageMaker CPU proxy containers
SageMaker CPU proxy containers Preserve preprocessing, postprocessing, monitoring, logging, and endpoint compatibility while forwarding inference. Prediction service clients, Amazon Bedrock serverless inference
Amazon Bedrock serverless inference Runs GPU-intensive custom model inference with autoscaling and pay-per-use economics. Bedrock Custom Model Import API, SageMaker CPU proxy containers
IAM and cross-account access Allows Bedrock to access Salesforce's S3 model bucket and clients to invoke Bedrock endpoints. S3 model store, Amazon Bedrock serverless inference

Data flow

CI/CD writes model artifacts to an S3 model store, then calls the Bedrock Custom Model Import API. Bedrock pulls the model from S3 and preloads it. At inference time, client requests go through Salesforce's preprocessing layer and SageMaker CPU proxy, which forwards the actual inference call to Bedrock, receives raw model output, applies postprocessing, and returns through the existing prediction-service interface.

4 supporting quotes
“After their continuous integration and continuous delivery (CI/CD) process saves model artifacts to their model store”article, stated
“they now call the Amazon Bedrock Custom Model Import API to register the model with Amazon Bedrock.”article, stated
“Client requests flow through their established preprocessing layer for business logic like prompt formatting before reaching Amazon Bedrock”article, stated
“lightweight SageMaker CPU containers that act as intelligent proxies—running their custom model.py logic while forwarding the actual inference to Amazon Bedrock endpoints.”article, stated

Why this architecture

Salesforce used a hybrid Bedrock-plus-proxy architecture to gain serverless custom-model deployment and cost benefits without forcing downstream application changes. The CPU proxies kept existing SageMaker monitoring, logging, preprocessing, and postprocessing, while Bedrock handled custom model import, autoscaling, and GPU inference.

3 supporting quotes
“keeping zero downtime and no required changes to downstream applications.”article, stated
“This hybrid architecture preserves their existing tooling framework: their prediction service continues calling SageMaker endpoints without routing changes”article, stated
“The trade-off involves an additional network hop adding 5–10 millisecond latency and the cost of always-on CPU instances”article, stated

Models used: Llama · Qwen · Mistral · ApexGuru · fine-tuned QWEN-2.5 13B · vLLM · TensorRT-LLM

Scale

Alternatives considered (roads not taken)

Continue traditional SageMaker managed inference for all custom models

Rejected because: It required months of instance-family, serving-engine, and configuration optimization and wasted reserved GPU capacity.

“teams spend months optimizing instance families, serving engines, and configurations.”article, stated
“expensive due to GPU capacity reservations for peak usage.”article, stated

Rewrite downstream applications for Bedrock directly

Rejected because: Salesforce prioritized zero downtime, no downstream application changes, and preserving existing endpoint interfaces.

“The team’s primary goal was to maintain their current API endpoints and model serving interfaces, keeping zero downtime and no required changes to downstream applications.”article, stated

Use API Gateway and Lambda for pre/post-processing

Rejected because: Salesforce found that approach less backward-compatible and saw cold-start impacts with larger processing libraries.

“they found this approach less backward-compatible with existing integrations and observed cold start impacts when using larger libraries”article, stated

Patterns

model-routing (deployment)

Salesforce preserved existing prediction-service endpoints through CPU proxies while routing model inference to Bedrock serverless endpoints.

“This hybrid architecture preserves their existing tooling framework: their prediction service continues calling SageMaker endpoints without routing changes, and they retain mature SageMaker monitoring and logging for preprocessing and postprocessing logic.”article, stated

cost-aware-routing (infrastructure cost)

The migration replaced peak GPU reservations with Bedrock pay-per-use economics for variable traffic patterns.

“The pay-per-use model proved especially beneficial for development, performance testing, and staging environments”article, stated

latency-optimization (serving)

Salesforce load-tested concurrency, throughput, autoscaling, and proxy latency to validate production performance.

“To validate the performance capabilities of Amazon Bedrock Custom Model Import, Salesforce conducted comprehensive load testing across various concurrency scenarios.”article, stated

canary-rollout (migration)

Salesforce migrated gradually, starting with non-critical workloads before broadening serverless custom-model deployment.

“Their success came from methodical execution: thorough load testing, and gradual migration starting with non-critical workloads.”article, stated

safety-policy-enforcement (platform integration)

Bedrock Custom Model Import integrates with Bedrock Guardrails, Knowledge Bases, and Agents while using IAM/cross-account access controls.

“integrating with Amazon Bedrock features like Amazon Bedrock Knowledge Bases, Amazon Bedrock Guardrails, and Amazon Bedrock Agents”article, stated

Tradeoffs

Use a hybrid proxy architecture.

Chose SageMaker CPU proxies plus Bedrock serverless inference over Directly replacing existing serving endpoints.

Rationale: The hybrid path preserves integrations, monitoring, and preprocessing/postprocessing while moving expensive GPU inference to Bedrock.

“This hybrid architecture preserves their existing tooling framework: their prediction service continues calling SageMaker endpoints without routing changes, and they retain mature SageMaker monitoring and logging for preprocessing and postprocessing logic.”article, stated
“The trade-off involves an additional network hop adding 5–10 millisecond latency and the cost of always-on CPU instances, but this approach delivers backward-compatibility with existing integrations while keeping the GPU-intensive inference fully serverless through Amazon Bedrock.”article, stated

Adopt serverless custom model deployment.

Chose Amazon Bedrock Custom Model Import over Reserved GPU capacity for peak usage.

Rationale: Variable traffic made reserved GPU capacity wasteful; Bedrock pay-per-use reduced cost for dev, test, staging, and production traffic mixes.

“they previously had to reserve GPU capacity for peak workloads.”article, stated
“The pay-per-use model proved especially beneficial for development, performance testing, and staging environments that only required GPU resources during active development cycles, avoiding the need for round-the-clock reserved capacity that often sat idle.”article, stated

Keep SageMaker for unsupported or highly customized cases.

Chose Bedrock where compatible, SageMaker AI for unsupported architectures over A single serving platform for every model.

Rationale: Bedrock compatibility depends on model architecture support; unsupported cutting-edge architectures may still need SageMaker.

“For highly customized models or unsupported architectures, Salesforce continues using SageMaker AI as a managed ML solution.”article, stated

Gotchas (what bit them)

LLM serving optimization can take months when infrastructure is self-managed.

Root cause: Teams had to tune instance families, serving engines such as vLLM versus TensorRT-LLM, and configurations.

Resolution: Use Bedrock Custom Model Import to abstract infrastructure decisions and focus on model performance.

“Deploying these models creates operational overheads: teams spend months optimizing instance families, serving engines, and configurations. This process is time-consuming, hard to maintain with frequent releases, and expensive due to GPU capacity reservations for peak usage.”article, stated
“alleviating complex decision-making around instance selection, parameter tuning, and choosing between serving engines like vLLM vs. TensorRT-LLM.”article, stated

Backward compatibility can add latency and cost.

Root cause: Keeping SageMaker proxy containers preserves existing interfaces but adds an extra network hop and always-on CPU instances.

Resolution: Accept the small proxy overhead to avoid downstream changes while moving GPU-intensive inference to Bedrock.

“The trade-off involves an additional network hop adding 5–10 millisecond latency and the cost of always-on CPU instances”article, stated
“this approach delivers backward-compatibility with existing integrations while keeping the GPU-intensive inference fully serverless through Amazon Bedrock.”article, stated

Cold starts can be minutes for larger models.

Root cause: Serverless custom model endpoints need to spin up larger model copies.

Resolution: Keep latency-sensitive endpoints warm with at least one active model copy via health checks every 14 minutes.

“Salesforce observed cold start delays of a couple of minutes with 26B parameter models, with latency varying based on model size.”article, stated
“For latency-sensitive applications that can’t tolerate such delays, they recommend keeping endpoints warm by maintaining at least one model copy active through health check invocations every 14 minutes. This approach balances cost-efficiency with performance requirements for production workloads.”article, stated

Evaluation

Salesforce used load testing across concurrency scenarios, measured latency and throughput, and evaluated operational efficiency and cost optimization after migration.

Metrics: Import step overhead: five to seven minutes. · Overall model release process: approximately one hour. · Deployment iteration improvement: 30%. · Cost reduction: up to 40%. · Concurrency 32 autoscaled to three model copies. · Proxy overhead: five to ten milliseconds. · Cold starts for 26B models: a couple of minutes.

3 supporting quotes
“Each test involved sending standardized payloads containing model IDs and input data through their proxy containers to Amazon Bedrock endpoints”article, stated
“The operational efficiency gains were substantial—the team achieved a 30% reduction in time to iterate and deploy models to production.”article, stated
“Cost optimization delivered even more dramatic results, with Salesforce achieving up to 40% cost reduction through Amazon Bedrock.”article, stated

Outcomes

The case reports ApexGuru fine-tuned Qwen-2.5 13B load tests, Bedrock scaling from one to three copies at concurrency 32, and a maintained approximately one-hour release process.

“They achieved 30% faster deployments and 40% cost savings while maintaining backward-compatibility through their hybrid architecture”article, stated
“Their success came from methodical execution: thorough load testing, and gradual migration starting with non-critical workloads. The results prove serverless AI deployment works for production, especially with variable traffic patterns. ApexGuru is now deployed in their production environment.”article, stated