Unit 5.5 · Tutorial 1

Cloud Platforms (AWS / GCP / Azure)

Chapter 16 · System Design & Deployment
~2.5 hours Intermediate AWS · GCP · Azure · IaaS · PaaS

Overview

Cloud platforms are the foundation of modern infrastructure. This tutorial covers the three major cloud providers: AWS, GCP, and Azure. You'll learn about their core services, deployment options (IaaS, PaaS, FaaS), and how to choose the right platform for your application.

Why this matters: Cloud platforms provide on‑demand infrastructure, reducing operational costs and enabling global scaling. Mastering cloud deployment is essential for any modern developer.

1. Introduction to Cloud Computing

Cloud computing is the delivery of computing services over the internet. Key benefits:

  • Pay‑as‑you‑go: Only pay for what you use.
  • Elasticity: Scale resources up or down based on demand.
  • Global reach: Deploy applications close to users worldwide.
  • Managed services: Reduce operational overhead.

Deployment models

  • Public cloud: Shared infrastructure (AWS, GCP, Azure).
  • Private cloud: Dedicated infrastructure for a single organisation.
  • Hybrid cloud: Combination of public and private.
  • Multi‑cloud: Using multiple public cloud providers.

2. AWS (Amazon Web Services)

AWS is the most mature and comprehensive cloud platform.

Core services

  • Compute: EC2 (VMs), Lambda (serverless), ECS/EKS (containers).
  • Storage: S3 (object storage), EBS (block storage), EFS (file storage).
  • Database: RDS (relational), DynamoDB (NoSQL), Aurora (cloud-native).
  • Networking: VPC (virtual network), Load Balancer, Route53 (DNS).
  • Monitoring: CloudWatch (metrics), X‑Ray (tracing).
# Deploy a Node.js app to AWS using CLI # Create EC2 instance aws ec2 run-instances --image-id ami-0abcdef1234567890 \ --instance-type t2.micro \ --key-name my-key-pair \ --security-group-ids sg-1234567890 # Deploy to Elastic Beanstalk eb init my-app --platform node.js eb create my-app-env eb deploy # Upload to S3 aws s3 cp ./build s3://my-bucket/ --recursive

3. Google Cloud Platform (GCP)

GCP is known for its data and AI capabilities, with strong container support.

Core services

  • Compute: Compute Engine (VMs), Cloud Run (serverless containers), GKE (Kubernetes).
  • Storage: Cloud Storage (object storage).
  • Database: Cloud SQL, Firestore (NoSQL), BigQuery (analytics).
  • Networking: VPC, Cloud Load Balancing, Cloud DNS.
  • Monitoring: Cloud Monitoring, Cloud Logging.
# Deploy to Cloud Run gcloud builds submit --tag gcr.io/my-project/my-app gcloud run deploy my-app \ --image gcr.io/my-project/my-app \ --platform managed \ --region us-central1 \ --allow-unauthenticated

4. Microsoft Azure

Azure is deeply integrated with Microsoft's ecosystem and offers excellent enterprise features.

Core services

  • Compute: Virtual Machines, App Service (PaaS), Azure Functions (serverless), AKS (Kubernetes).
  • Storage: Blob Storage (object storage).
  • Database: Azure SQL, Cosmos DB (NoSQL).
  • Networking: Virtual Network, Load Balancer, DNS.
  • Monitoring: Azure Monitor, Application Insights.
# Deploy to Azure App Service using CLI az webapp create \ --name my-app \ --resource-group my-resource-group \ --plan my-app-service-plan \ --runtime "NODE|18-lts" # Deploy code az webapp deploy \ --name my-app \ --resource-group my-resource-group \ --src-path ./dist.zip --type zip

5. IaaS vs PaaS vs FaaS

// Service model comparison | Service Model | Control | Management | Cost | Use Case | |---------------|---------|------------|------|----------| | IaaS (EC2) | High | High | Low | Custom infrastructure | | PaaS (App Service)| Medium | Medium | Medium | Standard applications | | FaaS (Lambda) | Low | Low | High (pay per use)| Event-driven workloads |

Choosing the right model

  • IaaS: Full control, custom configurations, legacy applications.
  • PaaS: Faster development, automatic scaling, less ops overhead.
  • FaaS (Serverless): Event‑driven workloads, infrequent usage, microservices.
Recommendation: Start with PaaS or FaaS for new applications. Use IaaS when you need specific configurations or legacy support.

Quiz

Question 1

Which AWS service is used for object storage?

  • EC2
  • S3
  • RDS
  • Lambda
Show answer
B. S3.

Question 2

Which Google Cloud service is a serverless container platform?

  • Compute Engine
  • Cloud Run
  • GKE
  • Cloud Functions
Show answer
B. Cloud Run.

Question 3

What is the primary difference between IaaS and PaaS?

  • PaaS is cheaper
  • IaaS provides more control; PaaS abstracts infrastructure management
  • PaaS is only for databases
  • IaaS is only for development
Show answer
B. IaaS provides more control; PaaS abstracts infrastructure management.

Exercises

Exercise 1

Compare AWS, GCP, and Azure for deploying a web application. List the equivalent services for compute, storage, and database.

Sample answer
  • Compute: AWS EC2 / GCP Compute Engine / Azure VMs
  • Storage: AWS S3 / GCP Cloud Storage / Azure Blob Storage
  • Database: AWS RDS / GCP Cloud SQL / Azure SQL Database
  • Serverless: AWS Lambda / GCP Cloud Functions / Azure Functions

Exercise 2

Choose a cloud provider for a startup with a budget of $500/month. Justify your choice considering costs, services, and learning curve.

Sample answer
  • Choice: AWS (free tier + pay‑as‑you‑go).
  • Justification: Largest ecosystem, extensive documentation, good free tier (EC2, S3, RDS).
  • Cost: Use t2.micro instances, S3 for static assets, RDS for database.

Homework

Homework 1

Create a cloud deployment plan for your capstone project. Choose a provider, list the services you'll use, and estimate the monthly cost.

Sample outline
  • Provider: AWS.
  • Services: EC2 (t3.micro), RDS (PostgreSQL), S3 (static assets).
  • Estimated cost: ~$30‑50/month (free tier + low usage).

Mini‑Project

Cloud Architecture Design

Design a cloud architecture for a full‑stack application that includes:

  • Frontend (React) hosted on a CDN
  • Backend API (Node.js) on a cloud VM
  • Database (PostgreSQL) on a managed service
  • Load balancer for scalability
  • Auto‑scaling group for the backend
  • Cost estimation
Sample outline
  • Frontend: AWS S3 + CloudFront (CDN) – ~$10/month.
  • Backend: AWS EC2 with Auto‑scaling (t3.medium) – ~$30/month.
  • Database: AWS RDS PostgreSQL (db.t3.micro) – ~$15/month.
  • Load Balancer: AWS ELB – ~$20/month.
  • Total: ~$75/month (low usage).

Tutorial Summary

You learned about the major cloud platforms (AWS, GCP, Azure), their core services, and the differences between IaaS, PaaS, and FaaS. You can now choose the right cloud platform and service model for your application.

Key takeaway: The cloud is not one‑size‑fits‑all. Choose the provider and service model that best fits your technical requirements, team expertise, and budget.