TLDR Version
A production cloud-based generative AI solution is a system built around the model, not just a model behind an API. It needs a layered architecture (application, orchestration, model, data, integration, security and observability), a deliberate choice between managed and self-hosted models, lifecycle-managed data pipelines, cost engineering from day one, permission-aware retrieval and AI-specific monitoring.
Key takeaways
- Architecture: design seven layers as one system, with the model behind an API you control so you can swap it later.
- Models: managed services are faster to start; self-hosting can pay off for steady, predictable load. A routing layer lets you use both.
- Data pipelines: ingestion needs refresh and deletion handling, not a one-time upload, or retrieval will serve stale or unauthorised content.
- Cost: driven by requests, tokens, context size, retrieval and GPU use. Agentic workflows multiply model calls per request.
- Security: enforce the requesting user’s permissions in retrieval and in tool access.
- Observability: trace retrieval, grounding, tool calls, tokens and cost to tell infrastructure faults from AI-quality faults.
The cloud makes AI accessible. Engineering makes it production-ready.
Generative AI has changed the economics of building software. A development team can now access powerful language models, integrate them into applications and build intelligent workflows without training a foundation model from scratch. Cloud platforms have accelerated this shift with managed infrastructure, scalable compute, storage, networking, model services and deployment tooling.
However, access to cloud infrastructure does not automatically produce a scalable AI solution. A prototype that works for ten users may behave very differently with hundreds. An application that looks inexpensive in development may become costly under sustained production load. A solution that performs well on a small dataset may struggle when connected to years of enterprise documents and transactional data. The real challenge is designing the complete system around the AI model.
- Start
Source systems
User request
Ingestion pipeline
Application API
Vector and data stores
Orchestration and model gateway
Managed or self-hosted model
Answer or action
- Outcome
Logging, evaluation and cost tracking
Why does cloud infrastructure matter for generative AI?
Generative AI workloads have different infrastructure requirements from conventional web applications. They can involve large language model inference, embedding generation, vector search and retrieval, document extraction and processing, large context windows, multi-step agent workflows, high-throughput API requests and GPU-intensive computation.
Cloud infrastructure gives organisations access to these capabilities without buying, installing and maintaining every component, and it allows individual parts of the architecture to scale with demand. A document processing workflow may need significant compute during ingestion but little during normal operation. An AI assistant may see predictable daily peaks, while an agentic application may generate bursts of model and tool requests. A well-designed cloud architecture accommodates these different workload patterns.
1. How should you choose a cloud architecture for generative AI?
There is no single architecture suitable for every application. The design depends on the use case, model, data sources, expected traffic, latency requirements and security constraints. A typical solution contains the following layers:
| Layer | Responsibility |
|---|---|
| Application layer | User interfaces, APIs and business workflows |
| Orchestration layer | Prompt management, routing and workflow execution |
| Model layer | Hosted LLMs or self-hosted models |
| Data layer | Databases, object storage and vector databases |
| Integration layer | ERP, CRM, internal APIs and third-party services |
| Security layer | Identity, access control, encryption and secrets |
| Observability layer | Logging, tracing, evaluation and monitoring |
These should be designed as a cohesive system. Placing an LLM behind an application API lets the organisation manage authentication, request validation, rate limiting and model selection independently of the user interface. Separating document ingestion from query-time retrieval makes it easier to process large volumes of data without affecting responsiveness. The architecture should also let individual components evolve without a complete redesign. For the wider picture of trade-offs, see designing production systems for failure.
2. Managed models or self-hosted models?
One of the most important cloud architecture decisions is whether to consume a managed model service or host a model independently.
Managed model services provide models through APIs or managed cloud environments.
- Advantages: faster implementation, reduced infrastructure management, access to model upgrades, easier initial scaling and less operational responsibility for model serving.
- Considerations: usage-based pricing, provider dependency, data processing and residency requirements, model availability and service limits, and less control over some infrastructure decisions.
Self-hosted models are open-weight models deployed on infrastructure the organisation controls.
- Advantages: greater infrastructure control, flexibility in model selection and configuration, potentially better economics for predictable, sustained workloads and more control over data boundaries.
- Considerations: GPU provisioning and utilisation, model serving and optimisation, capacity planning, security patching and infrastructure maintenance, and operational expertise.
A third option is a hybrid architecture. An application can use a managed model for some workloads and a self-hosted model for others, with a routing layer selecting a model by task complexity, sensitivity, latency or cost. This avoids treating model selection as a permanent decision. Our comparison of private LLM, enterprise API and on-premises options and the six decisions behind enterprise generative AI deployment go deeper.
3. How do you design data pipelines for AI workloads?
Generative AI applications are only as useful as the information they can access, and enterprise information is rarely organised for immediate use. A typical organisation has PDFs and scanned documents, spreadsheets, relational databases, ERP and CRM records, emails and attachments, internal knowledge bases and operational application data. A cloud-based AI architecture needs a reliable ingestion and processing pipeline:
- Source connectivity: Connect to enterprise systems and document repositories.
- Extraction: Extract text, tables, metadata and relevant structured information.
- Transformation: Clean, normalise and standardise the extracted information.
- Enrichment: Add metadata, business identifiers and access-control information.
- Indexing: Generate embeddings and populate the appropriate retrieval stores.
- Validation: Verify that ingestion and indexing have completed correctly.
- Refresh: Support incremental updates and deletion propagation.
The final step is particularly important. If an employee’s access to a document changes, the retrieval layer must reflect that change. If an outdated document is removed from a source system, the corresponding indexed content should not remain accessible indefinitely. Enterprise AI data pipelines therefore need lifecycle management, not a one-time upload. See also what an enterprise AI assistant needs beyond documents.
4. How do you scale without scaling cost unnecessarily?
Cloud scalability is often presented as an unconditional advantage. In practice, poorly designed systems become expensive as usage grows. Generative AI introduces several cost drivers:
- Number of model requests.
- Input and output token consumption.
- Context window size.
- Embedding generation.
- Retrieval operations.
- GPU utilisation.
- Data transfer.
- Storage and observability.
Cost optimisation begins with understanding workload characteristics:
- Can frequently requested information be cached?
- Can smaller models handle routine tasks?
- Can prompts be shortened without reducing quality?
- Can retrieval return fewer but more relevant documents?
- Can batch processing be used for non-interactive workloads?
- Can GPU capacity scale with demand?
- Can low-priority jobs run outside peak hours?
Also count the model calls inside a workflow. An agent that performs planning, retrieval, tool execution, verification and summarisation may make several model calls for one user request, so an agentic workflow can cost materially more than simple question answering. Cost engineering belongs in the architecture from the beginning. For the broader question of whether a rising bill is a pricing problem or a design problem, read is your cloud bill a cost problem or an architecture problem?
5. How do you handle security and compliance in cloud-based AI?
Cloud deployment does not remove an organisation’s responsibility for protecting its information. A generative AI application may process confidential documents, personal information, customer records, financial data or proprietary business data. The architecture should define:
- Where information is stored.
- Which services can process it.
- Which users can access it.
- Whether data is sent to external model providers.
- How credentials are managed.
- How information is encrypted.
- How activity is recorded.
- How long data is retained.
Access control deserves particular attention in RAG-based applications. The retrieval system should enforce the same permissions as the underlying enterprise information. Securing the document repository is not enough if the AI application can retrieve documents without checking the requesting user’s authorisation.
For agentic applications the same principle applies to tools. A model should not inherit unrestricted access to business systems simply because an application service account has broad permissions. Tool access should be explicitly scoped, with sensitive operations subject to additional verification or human approval; see from AI recommendations to AI actions.
6. What should you monitor in a production AI application?
Traditional monitoring covers availability, response time, errors and infrastructure utilisation. Generative AI applications need additional observability:
- Was the relevant information retrieved?
- Did the model use the retrieved context?
- Was the answer grounded in the source material?
- Did the model invoke the correct tool?
- Was the tool invocation successful?
- Did the application expose information outside the user’s permissions?
- How many tokens were consumed?
- How much did the request cost?
These signals help distinguish an infrastructure problem from an AI quality problem. If a business assistant starts returning inaccurate answers, the cause could be a failed ingestion process, poor document extraction, incorrect metadata, retrieval ranking, an unsuitable model, prompt configuration or an integration failure. Without end-to-end observability, diagnosis is unnecessarily difficult. Production AI systems should include structured logging, distributed tracing, evaluation datasets, feedback mechanisms and clear incident-handling processes; see how to evaluate an AI system before deployment.
7. How do you build cloud AI for change?
The AI ecosystem is changing rapidly. Models evolve, pricing changes, new inference services emerge, organisations discover new use cases and security and regulatory expectations develop. An architecture that tightly couples the application to a single model provider makes future change expensive.
A more flexible design separates the application from model-specific details. A model gateway or abstraction layer can manage model selection, provider-specific API integration, authentication, rate limiting, fallback behaviour, usage tracking, and request and response logging.
This does not mean abstracting every component. Excessive abstraction introduces its own complexity. The objective is to isolate the parts of the system most likely to change while keeping the architecture understandable and maintainable.
Key terms
- Cloud-based generative AI solution: an application that uses cloud infrastructure and services for model inference, data storage, retrieval, processing, hosting and integration.
- Managed model service: a model consumed through a provider’s API or managed environment, with usage-based pricing.
- Self-hosted model: an open-weight model run on infrastructure the organisation controls.
- Model gateway: a layer that handles model selection, authentication, rate limiting, fallback and usage tracking so applications are not tied to one provider.
- Retrieval-augmented generation (RAG): retrieving relevant content at query time and supplying it to the model as context.
- Groundedness: the degree to which an answer’s claims are supported by retrieved evidence.
A practical architecture checklist before deploying generative AI on the cloud
Before committing to production, assess the following:
| Area | Questions to resolve |
|---|---|
| Business requirements | What measurable outcome must the application deliver? |
| Model selection | Which model meets the quality, latency and cost requirements? |
| Data architecture | How will source data be ingested, refreshed and governed? |
| Infrastructure | Which components need managed services and which need custom hosting? |
| Scalability | How will the system handle peak concurrency and workload growth? |
| Security | How will identity, permissions and sensitive information be protected? |
| Cost | What is the expected cost per user, request or business transaction? |
| Observability | How will model quality, failures and usage be monitored? |
| Reliability | What happens when a model provider, database or external service becomes unavailable? |
| Maintainability | How can models and infrastructure components be changed safely? |
These questions are best answered during solution architecture rather than after the first production incident.
From cloud experimentation to production AI engineering
Cloud platforms have significantly lowered the barriers to building generative AI applications. But managed models and scalable infrastructure should not be confused with production readiness. A dependable AI application needs the same engineering discipline as any critical software system, plus additional care around model behaviour, data quality, evaluation and governance.
At Neuromotion Systems, we help organisations design and implement AI-enabled applications and the engineering infrastructure around them. Our work spans:
- Generative AI application development.
- Private LLM and RAG architectures.
- AI agent and workflow development.
- Cloud architecture and managed AWS services.
- Data engineering and integration.
- Custom software development.
- Platform engineering, QA and operational reliability.
Whether the requirement is an internal AI assistant, an intelligent business workflow or a cloud-native AI application, the objective is the same: a solution that can be deployed, operated, scaled and improved.
References and further reading
- AWS Well-Architected Framework: cloud architecture guidance across reliability, security, cost and performance.
- OWASP Top 10 for Large Language Model Applications: common LLM security risks such as prompt injection and sensitive information disclosure.
- NIST AI Risk Management Framework: a widely used framework for governing AI risk.
This article describes engineering considerations, not a guarantee of outcomes. Cloud services, model options and pricing change quickly; validate choices against your own workloads, data and obligations.
Next step: Explore NMSPL’s Generative AI Development Services, Managed AWS Services and Platform Engineering Services, or talk to our engineering team.