6.2. Cloud
To productionise code, utilising cloud platforms is the easiest path.
At its simplest, the cloud is just a machine you rent on-demand - one you can configure, deploy code to, and run jobs on.
The two dominant providers are Amazon Web Services (AWS) and Microsoft Azure. Within insurance, Azure is the more common choice because of enterprise adoption and integration with existing Microsoft tools.
Compute Options
There are two main types of compute service to run your code in the cloud: Serverless and VMs/Clusters.
| Feature | Serverless (e.g. AWS Lambda, Azure Functions, Container Apps) | VMs / Clusters (e.g. Azure VMs, Kubernetes Service) |
|---|---|---|
| Configuration | Minimal setup, you just write and deploy code | More setup: choose OS, instance size, networking |
| Run Pattern | Starts on trigger, runs code, shuts down automatically | Always-on, runs continuously |
| Cost Model | Pay only for execution time and resources used | Pay for uptime (even if idle) |
| Best for | Small workloads, APIs, event-driven tasks | Large/long-running apps, model servers, APIs |
| Scalability | Automatic horizontal scaling (spins up instances as needed) | Manual or semi-automated scaling |
| Use Case in Pricing | Lightweight code runs, lightweight pricing APIs | Hosting rating engines, heavier pricing APIs, or dashboards |
Development Workflow
A typical workflow looks like:
Develop locally → Push to repository → Deploy to cloud
To make this smooth and reliable:
- Ensure your local environment matches cloud compute (e.g. Docker containers).
- Automate testing and deployment (using CI/CD pipelines).
Azure
The production examples shown in this course will use Azure.
These require an Azure environment setup, the Azure CLI to be installed, and logged into on your machine.
For installing the Azure CLI:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Login with:
az login