DATASCI 350 - Data Science Computing

Lecture 16 - Introduction to Cloud Computing

Danilo Freire

Department of Data and Decision Sciences
Emory University

Hello, everyone! 👋

Brief recap 📚

The AI module

  • Last class closed the module with retrieval-augmented generation
  • Four stages: chunk → embed → retrieve → generate
  • The whole pipeline was about 50 lines of Python, on your own laptop
  • Fine-tuning changes the model’s weights, never its context
  • Use it for behaviour and style. Facts that change belong in retrieval
  • The ladder to take with you: prompt → RAG → fine-tune
  • Climb a rung only when the one below fails

Today we change the constraint

  • Every computer in the module was yours
  • One CPU, limited RAM, and it sleeps in your bag
  • Today we rent someone else’s
  • AWS, and a machine you control from your terminal

Lecture overview

What we will cover today

  • We start with the money: what a company pays for when it owns servers, and what changes when it rents them
  • Two newsroom stories from 2008 make the difference concrete
  • Then the vocabulary you will meet everywhere: IaaS, PaaS, SaaS, FaaS, and the virtual machines underneath
  • After that, a tour of the AWS catalogue, from compute to storage to databases
  • We look at what happens when AWS breaks, because it did, for fifteen hours last October
  • You open your own account, choose the free plan, and set a budget that emails you
  • We finish by handing a scanned document to Amazon Textract and reading what comes back

AWS lists 123 availability zones in 39 regions. The one that failed last October is on this page

Cloud computing ☁️

What is cloud computing?

  • Cloud computing is the on-demand delivery of computing resources over the internet, with pay-as-you-go pricing
  • The machine sits in someone else’s data centre, and you rent it by the second
  • Four service types: SaaS, PaaS, IaaS, and FaaS
  • The “Big Three” are AWS, Microsoft Azure, and Google Cloud
    • AWS holds about 28% of the market, Azure 21%, and Google Cloud 14% (Synergy Research, first quarter of 2026)
    • The world spent $129 billion on cloud infrastructure in those three months, 35% more than a year earlier
  • AWS is Amazon’s most profitable division
    • 21% of sales in the second quarter of 2026, and 60% of the company’s operating profit ($16.6 billion in three months)

Source: GeekWire (2025)

Why should we care about cloud computing?

Imagine you are opening a business…

Traditional approach

  1. Estimate supply and demand
  2. Estimate infrastructural needs
  3. Purchase and deploy infrastructure
  4. Install and test your system
  5. Offer your services to clients
  • Infrastructure is very expensive:
    • Hardware (Dell’s cheapest rack server starts at $6,500, and a useful one costs much more)
    • Real estate costs
    • Cooling system, power bill
    • A few systems engineers
    • Redundancy for high reliability
  • It takes time to deploy the infrastructure
  • What if the estimations were wrong?

Imagine you are opening a business…

Cloud approach

  1. Choose one or more cloud services providers
  2. Deploy your systems on the cloud
  3. Offer your services to clients
  4. Pay for what you use
Traditional process With Cloud Computing
❌ High investment risk ✅ Reduced risk
❌ Long time-to-market ✅ Shorter time-to-market
✅ Manages own data ❌ Trust the vendor?
✅ Completely in control ❌ Dependent on a specific vendor?

Case study: Animoto

  • Animoto: Lets users create videos from their own photos/music
  • Built using Amazon EC2 (Elastic Compute Cloud) + S3 (Simple Storage Service) + SQS (Simple Queue Service)
  • Released a Facebook app in mid-April 2008
  • More than 750,000 people signed up within 3 days
  • EC2 usage went from 50 machines to 3,500 (x70 scalability!)
  • No way they could have done this with traditional infrastructure!

Case study: The Washington Post

  • Hillary Clinton’s White House schedule was released to the public in 2008
  • 17,481 pages of low-quality PDF, none of it searchable
  • Reading it by hand would have taken hundreds of hours
  • Peter Harkins, a senior engineer at the paper, asked: “Can we make that data available more quickly, ideally within the same news cycle?”
  • He tested optical character recognition programs, then launched 200 EC2 instances
  • Nine hours of waiting, 1,407 hours of machine time, $144.62
  • The results were online 26 hours after the release

Cloud computing services ☁️

Cloud computing services

  • SaaS (Software as a Service): a finished application, used through your browser
    • Someone else runs the updates, the security, and the maintenance
    • You pay a subscription, monthly or yearly
    • Nothing to install and nothing to configure
    • Examples: Gmail, Office 365, Salesforce, GitHub Copilot

Cloud computing services

SaaS

Cloud computing services

PaaS

Cloud computing services

  • IaaS (Infrastructure as a Service):

Cloud computing services

FaaS

Cloud computing services

IaaS

Comparison of cloud services

On-premise IaaS PaaS SaaS
Application Application Application Application
Middleware Middleware Middleware Middleware
OS OS OS OS
Virtualisation Virtualisation Virtualisation Virtualisation
Servers Servers Servers Servers
Networking Networking Networking Networking

User manages
Provider manages

What is middleware?

  • Middleware is software that connects two separate applications
  • The name is literal: it sits between the operating system and the application
  • We rarely see it, and the internet stops working without it
  • It handles authentication, encryption, and the drivers that talk to databases
  • A message queue holds work until a machine is free, so neither side waits for the other
  • Animoto used SQS that way: the queue held the video jobs while EC2 grew to 3,500 machines
  • Apache Kafka and RabbitMQ do the same job outside AWS

What is virtualisation?

  • Suppose Alice has a machine with 4 CPUs and 8 GB of memory, and three customers:
    • Bob wants a machine with 1 CPU and 3 GB of memory
    • Charlie wants 2 CPUs and 1 GB of memory
    • Daniel wants 1 CPU and 4 GB of memory
  • What should Alice do?
  • Alice can sell each customer a virtual machine (VM) with the requested resources
  • From each customer’s perspective, it appears as if they had a physical machine all by themselves (isolation)

Amazon Web Services (AWS)

Amazon Web Services (AWS)

  • AWS is a collection of cloud-based services
  • It’s a very large platform
  • Let me say it again: a VERY LARGE ONE 😂
  • They offer a wide range of services:
    • Compute, storage, databases, analytics, machine learning, AI, IoT, security, and more
  • Many companies use AWS, including Netflix, Airbnb, and NASA
  • The most widely used services are EC2, S3, and RDS, for computing, storage, and databases, respectively
  • Let’s look at them in more detail

Amazon EC2 - Elastic Compute Cloud

  • Amazon EC2 is a web service that provides resizable compute capacity
  • It’s designed to make web-scale cloud computing easier
  • You can launch instances with a many operating systems (mainly Linux)
  • Which means that you can use Bash and run any software you want from the command line
  • You can also use a GUI, but it is not necessary
  • You can use EC2 to host a website, run a database, run a machine learning model, etc
  • https://aws.amazon.com/ec2/
  • However, please be mindful of the costs!
  • You pay for the instances you use, and the costs can add up quickly
  • Per-second (or per-hour) billing
  • Data transfer is not included!
  • Persistent storage is not included!
  • Scaling is not included!

EC2 auto scaling

  • Scaling is the ability to increase or decrease the compute capacity of your application
  • You can do it manually or automatically
  • Useful when you have fluctuating workloads, such as a website that gets more traffic during the day, or a machine learning model that gets more requests at certain times
  • You set a minimum, desired, and maximum number of instances, and AWS keeps the group inside those bounds
  • A rule triggers the change, usually average CPU or the number of requests
  • You can also set up load balancers to distribute traffic across multiple instances

ELB - Elastic Load Balancer

  • ELB is a service that distributes incoming application traffic across multiple targets
  • It handles the varying load of your application traffic in a single availability zone or across multiple availability zones
  • ELB is a key component of auto scaling
  • As with EC2, you pay for the data transfer and the number of requests
  • And it can be quite expensive too!
  • It can detect unhealthy instances and reroute traffic to healthy instances, so your application is always available
  • Health checks run every few seconds, and a failing instance stops receiving traffic until it recovers
  • The load balancer also holds the HTTPS certificate, so your instances do not each need one

Cloud storage

Amazon S3 - Simple Storage Service

  • Amazon has three main storage services: S3 (Simple Storage Service), EBS (Elastic Block Store), and EFS (Elastic File System)
  • S3 is a web service that provides scalable object storage for data backup, archival, and analytics
  • You can store data in buckets, which are like folders
  • Data are distributed across a minimum of three availability zones
    • 99.999999999% durability (eleven nines!)
  • You can set up lifecycle policies to automatically move data to cheaper storage classes
    • Standard, Intelligent-Tiering, Glacier, Glacier Deep Archive
  • You can also set up versioning to keep multiple versions of an object (works like git)

Cloud storage

Amazon EBS - Elastic Block Store

  • EBS is a web service that provides block storage volumes for use with EC2 instances
  • The difference between S3 and EBS is that EBS is block storage, while S3 is object storage
    • Block storage is like a hard drive, while object storage is like a file system
  • Why would you use it? Mainly for SQL files
    • Low-latency, high-performance storage for frequent access
  • You can attach EBS volumes to your EC2 instances
  • You can also take snapshots of your volumes for backup (like git again!)
  • Up to 64 TiB per volume

Amazon EFS - Elastic File System

  • EFS is a web service that provides scalable file storage for use with EC2 instances
  • EFS is mainly used for shared file storage
    • Multiple EC2 instances can access the same file system
    • Useful for big data and analytics
    • Also for content management and web serving
  • You can create file systems and mount them to your EC2 instances
  • An EBS volume attaches to one instance at a time, while many instances mount the same EFS file system
  • EFS grows and shrinks on its own, so there is no volume size to choose
  • As with S3 and EBS, you pay for the storage you use

Database services

Amazon RDS - Relational Database Service

  • Amazon RDS is a web service that makes it easy to set up and operate a relational database
  • You can choose from seven popular database engines:
    • Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, and Db2
  • It’s a managed service, so you don’t have to worry about backups, patches, or updates
  • It works well with another AWS service called Athena, which allows you to query data in S3 using SQL
  • The database runs on a machine you never log into. You get a hostname and a port, and no ssh
  • Multi-AZ keeps a standby copy in another availability zone and fails over on its own
  • You can also use Redshift for data warehousing and business analytics, and DynamoDB for NoSQL databases

Amazon SageMaker AI

When AWS has a bad night

19 October 2025, us-east-1

  • Two of DynamoDB’s DNS programs updated the same record at once, and the stale one finished last
  • That is a race condition: two processes touch the same thing at the same time, and the result depends on who wins
  • The address for dynamodb.us-east-1.amazonaws.com was left empty, so nothing could find the database
  • The failure spread to EC2 launches, load balancer health checks, and signing in to the console
  • The region took roughly fifteen hours to recover
  • Snapchat, Fortnite, Duolingo, Signal, Ring doorbells and several banks went down with it, and 17 million people reported problems
  • Analysts put the losses above $550 million

  • You rent capacity from AWS. Reliability stays your problem, and it starts with not keeping everything in one region!

Creating and managing an AWS account 🛠️

Creating an AWS account

Ten minutes, and you need a payment card

  1. Open https://aws.amazon.com/free/
  2. Choose Create a Free Account
  3. Enter a personal email address. Keep your Emory address for coursework
  4. Choose any account name
  5. Choose Verify email address
  6. Copy the code from the email into the form
  7. AWS requires a card and may place a small temporary authorisation on it. Enter your card details
  8. Complete the phone verification
  9. Choose your account plan. The next slide covers that choice

Do this at home, before or after class. Please let me know if you have any problems

Free plan or paid plan?

Choose the free plan

  • The account starts with $100 in credits, and the console offers up to $100 more for trying key services
  • That is $200 across the six months of the free plan
  • The plan ends after six months or when the credits run out, whichever comes first
  • AWS puts it plainly: you will not be charged unless you convert to a paid plan
  • The free plan blocks some services, and workloads stop at the credit thresholds
  • Everything this course asks of you fits inside those limits

When the free plan ends, the account closes on its own and takes your files with it. Download anything you want to keep

Set a zero-spend budget

Your first job in the console

  1. Open the Billing and Cost Management console.
  2. Choose Budgets in the left menu.
  3. Choose Create budget.
  4. Keep Use a template (simplified).
  5. Choose Zero spend budget.
  6. Keep the suggested name.
  7. Enter your email address.
  8. Choose Create budget.

The template emails you once your spending passes $0.01

The budget accepts up to ten addresses. Use one you actually read!

Check that it worked

And what the alert will not do for you

The budget list after saving

The same budget on the billing home

  • The budget appears in the list with a Healthy status
  • Billing and Cost Management home repeats it in the Cost monitor panel
  • Billing and Payments, then Credits is where you watch the $200 drain

Billing data refreshes about once a day, so the email arrives late. An instance left running overnight bills you before anyone warns you

Forecast alerts need roughly five weeks of history, so a new account gets none this term. Terminating what you start is still the real protection

Reading a scanned document

Amazon Textract

The 2008 job, in a browser, in about a minute

  1. Open the console and search for Textract
  2. Choose Analyze Document under Demos
  3. Upload clinton-schedule-2001-pages-11-20.pdf
  4. Tick the outputs you want
  5. Choose Apply configuration

Ten pages of Hillary Clinton’s 2001 schedule, the same typewritten paper The Washington Post fed through OCR

New accounts get 1,000 pages a month of plain text detection for three months. The layout, forms and tables features cost more, so read the pricing page before a large run

What you can ask for

Five kinds of structure, one document

  • Layout: titles, paragraphs, headers, lists, page numbers, and the reading order
  • Forms: key and value pairs, the way a paper form pairs a label with its box
  • Tables: cells, rows, and columns
  • Queries: put a question to the page, such as who signed it
  • Signature detection: where a signature sits

Plain text detection is the cheap option. Everything above it costs more per page

Page 1 of 10, with the outputs about to be applied

What came back

Blocks in reading order, each with a confidence score

  • Textract returns blocks in reading order, each labelled by type
  • Page 8 came back as a header, a list, and eleven text blocks
  • The header reads “SCHEDULE FOR HILLARY RODAHM CLINTON”
  • The typo is in the 2001 document. Textract copied the page faithfully
  • Anyone searching these files for “Rodham” would miss this page
  • Scores on this page ran from 28% to 92%. They rate how sure Textract is about the type of block, not the spelling inside it
  • The Raw text tab gives the plain transcript to copy
  • The appendix runs an audio transcription job using Amazon Transcribe

The Layout tab, page 8 of 10

Conclusion

What we learned today

  • Why cloud computing is important and how it can help your business
  • The Big Three cloud computing platforms: AWS, Azure, and GCP
  • The main types of cloud computing services: IaaS, PaaS, SaaS, FaaS
  • The most popular AWS services: EC2, S3, RDS, SageMaker
  • How to create an AWS account and set up a billing alarm
  • How to create an S3 bucket, upload an audio file, and transcribe it with Amazon Transcribe
  • And that’s just the beginning!
  • In the next sessions, we will learn more about AWS services, and how to use them to build and deploy applications
  • Remember to close your EC2 instances and S3 buckets when you’re done!

Next class

Inside the machine you just rented

  • We launch an EC2 instance from the console and connect to it over SSH with a key pair
  • That key pair is a file on your laptop. It never goes into a Git repository, because bots scan public repositories for AWS keys
  • Ubuntu Linux, so every command from the shell module works there
  • We install software with apt, move files with scp, and run a Python script on the instance
  • We finish by terminating it, which is the habit that keeps the bill at zero
  • The final project is released the same day

Before then:

  1. Create your AWS account
  2. Set the zero-spend budget
  3. Windows users, install WSL. Tutorial 06 has the steps
  4. Check that ssh runs in your terminal

Bring the laptop you will use in class. Setting up SSH on a borrowed machine costs the whole session

Quiz 03 covers the AI module and this cloud module

Thank you very much!
See you next time! 😊🙏🏽

Appendix: Amazon Transcribe 🎤

Audio transcription at scale

  • Imagine that you have a task similar to that of the Washington Post journalists
  • You found a series of audio files that you need to transcribe, and you have to do it quickly
  • So let’s create an S3 bucket (folder), upload an audio file, and transcribe it
  • The file we will use is available here: transcribe-sample.mp3
  • Select AWS Management Console to open the console, then search for S3 in the search bar
  • Click on Create bucket, give it a name, accept the permissions, and click Create bucket

Audio transcription at scale

S3 bucket

Then click on the bucket and upload the file

Create transcription job

  • Now let’s go to Amazon Transcribe
  • Just search for Transcribe in the search bar
  • Click on Transcription jobs (left sidebar), then click on Create job
  • Give it a name, select the language, and choose the S3 bucket where the file is located
  • Click Create

Transcription job

Transcription job