08. Programming & Technologies
Cloud Platforms for Agentic AI (AWS, Azure, GCP)
Agentic AI on the cloud is the same architecture on AWS, Azure, or GCP: secured edge, compute for the agent loop, managed model APIs, data stores (SQL/object/vector), secrets/IAM, and observability with budgets. Pick the cloud that matches your estate — Bedrock, Azure AI, or Vertex/Gemini — then map layers, not logos.
What you will learn
- Sketch agent layers that map to any major cloud
- Name core AI services on AWS, Azure, and GCP
- Choose a cloud from estate and compliance constraints
- List IAM, secrets, networking, and cost controls for agents
- Answer interview questions with short, solid answers
Definition
Running Agentic AI on a cloud platform means hosting the agent runtime and its dependencies on AWS, Microsoft Azure, or Google Cloud: APIs/gateways, containers or functions, model endpoints, databases and vector indexes, secret stores, identity, networking, logging, and spend controls.
The frameworks from Module 07 and languages from earlier Module 08 lessons deploy onto these layers. Cloud choice is usually about existing accounts, compliance, and team skills — not a single “best AI cloud.”
Introduction
This lesson (#8 in Programming & Technologies) follows Embeddings/RAG. You can build retrieval locally; production agents need cloud identity, scale, and ops.
Next: Docker and Kubernetes for Agent Deployment.
Why cloud for agents
- Managed model APIs with regional residency options
- Elastic compute for spiky agent/tool traffic
- Managed SQL, object storage, queues, and vector options
- IAM + secrets managers beat keys in repos
- Central logs, traces, and billing alerts for runaway loops
Shared architecture layers
Draw these boxes once; rename services per cloud.
- Edge - API gateway, auth (JWT/OIDC), WAF, rate limits
- Compute - containers (ECS/AKS/GKE/Cloud Run) or functions
- Models - managed LLM/embedding endpoints
- Data - OLTP, object store, vector index, queues/caches
- Control - secrets, IAM roles, VPC, logs/traces, cost caps
AWS
- Amazon Bedrock for managed foundation models + agents patterns
- Lambda / ECS/Fargate / EKS for agent runtimes
- S3 for corpora; RDS/Aurora for OLTP; OpenSearch/vector options
- IAM roles, Secrets Manager, CloudWatch, X-Ray
- Strong fit when the company is already deep in AWS
Azure
- Azure OpenAI / Azure AI Foundry for models in Microsoft tenancy
- Functions, Container Apps, AKS for compute
- Semantic Kernel + Entra ID natural for enterprise plugins
- Cosmos/SQL + Blob; AI Search for retrieval scenarios
- Strong fit for M365, .NET, and Microsoft identity estates
GCP
- Vertex AI + Gemini for models; Agent Development Kit affinity
- Cloud Run / GKE for services; Cloud Functions where suitable
- BigQuery + Cloud Storage for data-heavy agent pipelines
- Secret Manager, IAM, Cloud Logging/Trace
- Strong fit for analytics-heavy and Gemini-centered stacks
Decision map
Default to the cloud you already operate securely.
- Existing AWS landing zone → AWS / Bedrock path
- Entra + M365 + .NET → Azure AI path
- Data/ML on GCP or Gemini-first → Vertex path
- Regulated residency → pick regions and private networking first
- Avoid “all three” unless product or risk truly requires it
Security and cost controls
- Workload identity — no long-lived keys in containers when avoidable
- Private endpoints / VPC for model and data planes when required
- Per-tenant and per-tool rate limits at the edge
- Budgets + anomaly alerts on model and egress spend
- Least-privilege IAM for tool roles (read ticket ≠ refund)
- Encrypt data at rest; classify logs that may hold prompts
Map to earlier modules
- Compute hosts Python/TS agent services from prior lessons
- Model layer = LLM providers (often via cloud AI gateways)
- Data layer = SQL/NoSQL + vector + object storage for RAG
- Frameworks (SK, ADK, Bedrock agents) lean into their clouds
- Next: package agents with Docker/Kubernetes
Failure modes
- API keys in env files committed to git
- Public agent endpoints without auth or quotas
- Unbounded tool loops → surprise cloud bills
- Putting vectors in the wrong region vs data residency rules
- Rewriting portable agent code for every cloud SDK fad
Program / implementation notes
Deploy one small agent API to a managed container service, call a managed model API with IAM/secret injection, store runs in managed SQL, and turn on request logging plus a hard monthly budget alert.
- Keep a thin adapter over model providers for portability
- Next: Docker and Kubernetes for Agent Deployment
Advantages and limitations
- Advantage: managed scale, identity, and model hosting
- Advantage: integrated logging and spend visibility
- Advantage: regional controls for enterprise compliance
- Limitation: vendor service names and quotas change often
- Limitation: egress and cross-region RAG can get expensive
- Limitation: multi-cloud “portability” is earned, not free
Key points
- Design portable layers: edge, compute, models, data, control plane.
- AWS: Bedrock + familiar AWS data/IAM stack.
- Azure: Azure OpenAI/AI Foundry + Entra/M365 enterprise fit.
- GCP: Vertex/Gemini + Cloud Run/data services.
- IAM, secrets, private networking, and budgets are mandatory.
- Pick cloud by estate and compliance, then map services.
FAQs
Which cloud is best for agents?
The one your org already runs well. AI features are strong on all three; identity, data gravity, and skills usually decide.
Serverless or Kubernetes for agents?
Functions suit short bursts; long tool loops and streaming often fit containers (Cloud Run/ECS/Container Apps/GKE). Match to timeout and concurrency needs.
Should model calls leave the VPC?
Follow compliance: use private endpoints/regional AI services when required; otherwise still use IAM, TLS, and no browser-held keys.
Is multi-cloud worth it?
Only for concrete residency, failover, or customer requirements. Abstractions help; dual-running everything doubles ops cost.
Interview questions
- What cloud building blocks do agents need?
Answer An authenticated edge, compute for the agent loop, managed model access, data stores (SQL/object/vector), secrets/IAM, and observability with cost controls.
- Name an AI entry point on AWS, Azure, and GCP.
Answer AWS Bedrock; Azure OpenAI / Azure AI Foundry; GCP Vertex AI with Gemini — plus each cloud’s container/function compute around them.
- How do you secure agent credentials in cloud?
Answer Prefer workload identity and secret managers, short-lived credentials, least-privilege roles per tool, and never ship provider keys to the browser.
- How do you control agent cloud spend?
Answer Rate limits, max steps/timeouts, model/token budgets, anomaly billing alerts, and per-tenant quotas — agent loops amplify cost without caps.
- When choose Azure over AWS for agents?
Answer When Entra ID, M365 data, .NET/Semantic Kernel, or Azure OpenAI tenancy requirements dominate the architecture.
- How does this relate to Docker/Kubernetes next?
Answer Cloud lessons pick where you run; containers package the agent service so the same image deploys to ECS, AKS, GKE, or Cloud Run-style platforms.
Related topics
Practice task
Complete each numbered practice step in a notebook or doc before opening the next lesson.
- Draw the five agent layers and label one AWS, one Azure, and one GCP service for each.
- Pick a cloud for a bank already on Azure with Entra — justify in 3 bullets.
- List 5 IAM/secret rules you would enforce before production.
- Write a cost-control checklist (limits, budgets, alerts) for a tool-using agent.
- Answer interview questions 1, 2, and 4 in two sentences each.