Quiz 2

Cloud Computing for Data Science

352 words
2 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Cloud Computing for Data Science ## 🎯 Learning Objectives - Understand cloud service models (IaaS, PaaS, SaaS) - Provision cloud resources for data science workloads - Use cloud storage (S3, GCS, Blob) for data lakes - Deploy ML models on cloud platforms ## 📖 Core Content ### 7.1 Cloud Service Models *(Diagram)*...

Cloud Computing for Data Science

🎯 Learning Objectives

  • Understand cloud service models (IaaS, PaaS, SaaS)
  • Provision cloud resources for data science workloads
  • Use cloud storage (S3, GCS, Blob) for data lakes
  • Deploy ML models on cloud platforms

📖 Core Content

7.1 Cloud Service Models

(Diagram)

7.2 Cloud Services for Data Science

CategoryAWSGCPAzure
ComputeEC2, SageMakerCompute Engine, Vertex AIVMs, Azure ML
StorageS3GCS (Cloud Storage)Blob Storage
ServerlessLambdaCloud FunctionsFunctions
Data WarehouseRedshiftBigQuerySynapse
OrchestrationStep FunctionsComposer (Airflow)Data Factory
ML PlatformSageMakerVertex AIAzure ML

7.3 Cloud Storage for Data Science

python
# runnable
# Note: Requires boto3 (AWS) or google-cloud-storage (GCP)
# AWS S3 example:
# import boto3
#
# s3 = boto3.client('s3')
#
# # Upload data
# s3.upload_file('local_data.csv', 'my-bucket', 'data/raw/data.csv')
#
# # Download data
# s3.download_file('my-bucket', 'data/processed/features.parquet', 'features.parquet')
#
# # List files
# response = s3.list_objects_v2(Bucket='my-bucket', Prefix='data/')
# for obj in response['Contents']:
#     print(obj['Key'])

7.4 Cost Management

StrategyDescription
Reserved instancesPrepay for 1-3 years (up to 70% discount)
Spot instancesUse spare capacity (up to 90% discount, interruptible)
Auto-scalingScale down when not needed
Lifecycle policiesMove old data to cheaper storage tiers
MonitoringSet budgets and alerts (don't get surprise bills)

📝 Practice Questions

Q1: When would you use EC2 vs Lambda vs SageMaker?
EC2: Full control, any workload, persistent. Lambda: Short-running (≤15 min), event-driven, no server management. SageMaker: Managed ML lifecycle (training, tuning, deployment). Use SageMaker for ML, Lambda for simple API triggers, EC2 for general compute. Q2: What is object storage and why is it good for data lakes?
Object storage (S3, GCS) stores data as objects with metadata and unique IDs. It's: (1) infinitely scalable (exabytes), (2) cheap ($0.023/GB/month), (3) accessible via HTTP APIs, (4) durable (99.999999999% durability). Perfect for storing raw data before processing. Q3: How do you avoid cloud cost surprises?
  1. Set budget alerts (notify at 50%, 80%, 100% of budget)
  2. Use auto-scaling to reduce idle resources
  3. Clean up unused resources (forgotten EC2 instances, old snapshots)
  4. Use spot instances for non-critical training
  5. Monitor costs weekly; spikes usually mean a misconfiguration Join Discord PreviousMLflow & ExperimentsNextRegular Expressions
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.