
Cloud
Learning Level
Compute services are the core of cloud applications. Each provider offers multiple options from managed servers to fully serverless, each with different trade-offs in control, management, and cost.
| Aspect | AWS | GCP | Azure | Firebase |
|---|---|---|---|---|
| VMs | EC2 | Compute Engine | Virtual Machines | N/A |
| Managed Containers | ECS | Cloud Run | Container Instances | N/A |
| Kubernetes | EKS | GKE | AKS | N/A |
| App Platform | Elastic Beanstalk | App Engine | App Service | N/A |
| Serverless | Lambda | Cloud Functions | Functions | Cloud Functions |
| Pricing Model | Pay per compute | Pay per use | Various | Pay per invocation |
# Launch an EC2 instance
aws ec2 run-instances --image-id ami-0c55b159cbfafe1f0 --instance-type t3.micro --key-name my-key# Create a VM instance
gcloud compute instances create my-instance --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud --machine-type=e2-micro# Create a VM
az vm create --resource-group myResourceGroup --name myVM --image UbuntuLTS --admin-username azureuser// Deploy Node.js app to Cloud Run
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('Hello from Cloud Run!');
});
const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});exports.handler = async (event) => {
console.log('Event:', event);
return {
statusCode: 200,
body: JSON.stringify('Hello from Lambda!')
};
};exports.helloWorld = (req, res) => {
res.send('Hello from Cloud Functions!');
};module.exports = async function (context, req) {
context.res = {
body: 'Hello from Azure Functions!'
};
};const functions = require('firebase-functions');
exports.hello = functions.https.onRequest((req, res) => {
res.send('Hello from Firebase!');
});| Scenario | AWS | GCP | Azure |
|---|---|---|---|
| Small VM (24/7) | $9 | $6 | $10 |
| 1M function calls | $20 | $2 | $1 |
| Container app (24/7) | $8 | $15 | $10 |
VM to Containers: Extract application into Docker image
Containers to Serverless: Refactor into functions (if possible)
VM to Platform Service: Repackage app for target platform
1. Need Kubernetes? → Use EKS, GKE, or AKS
2. Need serverless? → Use Lambda, Cloud Functions, or Firebase
3. Need simple containers? → Use ECS, Cloud Run, or Container Instances
4. Need managed platform? → Use Elastic Beanstalk, App Engine, or App Service
5. Need full control? → Use VMs (EC2, Compute Engine, VMs)
Recommendation: Start with the managed service (Cloud Run, App Service, Elastic Beanstalk) and move to VMs/Kubernetes only if needed.
Resources
Ojasa Mirai
Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.
Learn Deep • Build Real • Verify Skills • Launch Forward