Using a Model Platform Natively on the Cloud: Architecture, Permissions, and Migration
This article explains how to use a model vendor's native platform while keeping billing, identity, and access control inside your cloud account. It covers the three-layer architecture, the unified service prefix for fine-grained permissions, SigV4 versus API key authentication, the outbound web identity federation prerequisite that is easy to miss, observability and cost governance, and a checklist for migrating from a managed model service, including a canary dual-run strategy. It also notes the key data boundary difference: processing happens outside the cloud provider's security boundary.
1. Why Cloud-Native Access to a Vendor Platform Is Now an Option
In enterprise LLM adoption, two disconnected access patterns have long coexisted. The first calls models through a managed model service from a cloud provider. The advantage is that data stays inside the cloud’s security boundary, with unified billing and permissions; the drawback is that platform capabilities often lag behind the model vendor’s latest features. The second connects directly to the model vendor’s native platform, giving immediate access to new model capabilities, the native console, and the full API surface; the drawback is that you must maintain a separate set of accounts, keys, contracts, and billing relationships, which lengthens the security governance chain.
The “use the vendor platform natively on the cloud” pattern emerged to resolve this tension: the platform is still operated by the model vendor and keeps its native APIs and feature experience, but billing, authentication, and access control are pushed down into the cloud account system. Users call the platform with their existing cloud credentials and permission policies, without managing vendor-side keys separately. One point deserves special emphasis: the data boundary. This pattern typically processes data outside the cloud provider’s security boundary, which is fundamentally different from a managed service where “data does not leave the cloud boundary.” Compliance assessment must happen up front.
2. Architecture Layers and Responsibilities
Understanding this pattern comes down to separating three layers of responsibility:
- Cloud platform layer: provides regional compute and networking, unified billing, identity and access management, auditing, and monitoring with alerting.
- Model platform layer: operated by the model vendor, responsible for model inference, native APIs, model version iteration, and platform-side features.
- Client layer: business applications issue calls over standard protocols and SDKs, handling streaming output, retries, and timeouts.
The direct consequence of this layering is that available regions are determined by the cloud platform, while model capabilities and API semantics are determined by the model platform. Launches usually start from the “generally available” nodes and expand to more regions over time, so region selection must be a configurable item in the architecture design rather than hard-coded.
3. Identity, Permissions, and the Authentication Model
The core design on the permissions side is a unified service prefix, used to describe precisely in the Action, Resource, and Condition elements of a permission policy “which class of platform capability is allowed.” This means permissions can be refined to the API level, and condition keys can enforce governance requirements such as source restrictions and time-window restrictions.
Authentication typically offers two paths: the cloud platform’s request signing mechanism (SigV4-style), and a platform-side API key as an alternative. The trade-off logic is as follows:
- Signing mechanism: no long-lived keys; credentials are issued temporarily by the cloud account and align naturally with the existing IAM system. Suited to production environments and automated pipelines.
- API key: minimal integration changes, suited to prototype validation and local debugging, but requires additional key custody and rotation mechanisms.
Illustrative policy fragment (structural illustration, not a specific API):
{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Action": ["<service-prefix>:InvokeModel", "<service-prefix>:ListModels"],"Resource": "*","Condition": { "StringEquals": { "<service-prefix>:SourceAccount": "<account-id>" } }}]}
4. Networking and Outbound Federation: The Most Overlooked Prerequisite
Calling an external platform from within the cloud is outbound access. If the organization has enabled security policies for outbound web identity federation, that capability must be explicitly turned on for every cloud account; otherwise requests fail outright at the federation validation stage, and the error message often points to identity rather than network, making troubleshooting costly. It is advisable to include the “per-account outbound federation switch” in infrastructure-as-code templates so that new accounts inherit it automatically.
The network side also requires consideration of whether outbound traffic passes through a unified proxy and gateway, whether a fixed egress address is needed to satisfy the counterpart’s access control, and whether DNS resolution is reachable in a private network environment. These all fall within general network engineering and should be aligned with the network team during the design phase.
5. Observability and Cost Governance
The value of unified billing is cost attribution. In practice, it is recommended to apply three categories of tags: business line, environment, and call source. For logging and monitoring, bring request volume, error rate, latency distribution, and stream interruption rate into monitoring and alerting; recording prompts and response content must follow the data minimization principle to avoid writing sensitive data into the logging service. Quota management should distinguish “account-level hard quotas” from “application-level soft rate limiting,” and clients should implement exponential backoff with jitter on retries to prevent transient spikes from amplifying failures.
6. Migration Checklist from a Managed Model Service
Migration is essentially an interface contract change. Verify the following items one by one:
- Replace the service entry address (Base URL);
- Switch request and response body formats to the vendor’s native message protocol;
- Model identifier naming rules change, so a mapping table is needed;
- Replace the SDK client and dependency packages;
- Adjust the signing service name;
- Adapt to the chunk format and parsing logic of streaming responses;
- Add request headers for the workspace/project dimension;
- Enable per-account outbound federation in advance.
Illustrative call skeleton:
client = NativeClient(base_url="<native-platform-endpoint>",auth=SigV4Auth(service="<signing-service-name>"),default_headers={"workspace": "<workspace-id>"},)with client.stream(model="<model-id>", messages=[{"role": "user", "content": "..." }]) as resp:for chunk in resp:handle(chunk.delta)
For migration strategy, a “dual-run canary” is recommended: route a portion of requests to the new path by traffic percentage, compare success rate, latency, and output consistency, then gradually increase the percentage, while keeping the old path as a rollback route.
7. Selection Guidance
If the business has strong constraints on data residency and the in-cloud boundary, prefer the managed option that processes data inside the cloud. If the business needs immediate access to new models and features on the native platform and can accept data being processed outside the cloud boundary, cloud-native access is the better fit. A common general practice at Baidu AI Cloud in similar scenarios is to first standardize the three governance foundations—identity, network, and auditing—and then let the business side switch access modes through configuration, turning the architecture choice into an operable capability rather than a one-time overhaul.
