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 we built a retrieval-augmented generation (RAG) pipeline
  • The pipeline has five stages: chunk → embed → store → retrieve → generate
  • Fine-tuning changes the model’s weights, while RAG changes its context
  • Fine-tuning is for behaviour and style, and RAG is for facts that change
  • Try the options in this order: prompt → RAG → fine-tune
  • Only move on when the previous option does not work

Today we move to the cloud

  • So far, all the computers we used were yours
  • Today we rent someone else’s computer from AWS
  • You will control it from your terminal

Lecture overview

What we will cover today

  • We start with the money: owning servers versus renting them
  • Two stories: Animoto and The Washington Post
  • Then the vocabulary: IaaS, PaaS, SaaS, FaaS and virtual machines
  • A tour of AWS: compute, storage, and databases
  • The October 2025 outage, when AWS broke for fifteen hours
  • You open an account and set a budget that emails you
  • We read a scanned document with Amazon Textract

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

Tweet of the day

Source: X

Paper of the day

Source: arXiv

Cloud computing ☁️

What is cloud computing?

  • Cloud computing is renting computers over the internet
  • You pay as you go, often by the second
  • The machine sits in someone else’s data centre
  • The “Big Three” are AWS, Microsoft Azure, and Google Cloud
  • AWS is Amazon’s most profitable division
    • In Q2 2026: 21% of sales and 60% of operating profit ($16.6 billion, Amazon)

Chart to Q3 2024: GeekWire. 2026 figures: Amazon Q2 2026 results

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 $5,549, and a good 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

  • In 2008, Hillary Clinton’s White House schedule was made public
  • It was 17,481 pages of low-quality PDF, and none of it was searchable
  • Reading it by hand would have taken hundreds of hours
  • Peter Harkins, a senior engineer at the paper, wanted the data in the newsroom within the same news cycle
  • He ran optical character recognition (OCR) software on 200 EC2 instances
  • The job took nine hours and 1,407 hours of machine time, and it cost $144.62
  • The searchable database went public 26 hours after that

Cloud computing services ☁️

Cloud computing services

  • SaaS (Software as a Service): a finished application, used through your browser

Cloud computing services

SaaS

Cloud computing services

PaaS

Cloud computing services

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
  • It sits between the operating system and the application
  • We rarely see it, but most of the internet depends on 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 😂
  • It offers services for:
    • 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

  • EC2 rents you virtual machines, called instances
  • You can resize them whenever you need to
  • Most run Linux, but other systems are available
  • You control them with Bash from the command line
  • A GUI exists, but you do not need it
  • Uses: websites, databases, machine learning models
  • https://aws.amazon.com/ec2/
  • Be mindful of the costs! They add up quickly
  • Billing is per second (or per hour)
  • Not included: data transfer, persistent storage, and scaling

EC2 auto scaling

  • Scaling means adding or removing compute capacity
  • You can scale by hand or automatically
  • It helps with fluctuating workloads
  • Example: a website that is busier during the day
  • You set a minimum, desired, and maximum number of instances
  • AWS keeps the group inside those bounds
  • A rule triggers the change, usually average CPU or request count
  • Load balancers spread the traffic across the instances

ELB - Elastic Load Balancer

  • ELB spreads incoming traffic across several instances
  • It works in one availability zone or across several
  • Auto scaling adds instances, and ELB sends traffic to them
  • Health checks run every few seconds
  • A failing instance gets no traffic until it recovers
  • ELB holds the HTTPS certificate, so the instances do not need one
  • You pay for data transfer and requests. It can get expensive

Cloud storage

Amazon S3 - Simple Storage Service

  • AWS has three main storage services: S3, EBS, and EFS
  • S3 is object storage for backups, archives, and analytics
  • Files live in buckets, the top-level containers of S3
  • Each file is stored in at least three availability zones
  • Durability is 99.999999999% (eleven nines!)
  • Lifecycle policies move old data to cheaper storage classes
    • Standard, Intelligent-Tiering, and Glacier (Instant, Flexible, Deep Archive)
  • Versioning keeps old versions of a file, like git

Cloud storage

Amazon EBS - Elastic Block Store

  • EBS gives EC2 instances block storage
  • Block storage works like a hard drive
  • EC2 formats it and runs its operating system on it
  • S3 is different: it is object storage
  • Object storage keeps whole files and their metadata, reached over the web
  • Main use: the disk of an EC2 instance, for the system and databases
  • Snapshots back up a volume (like git again!)
  • Up to 64 TiB per volume

Amazon EFS - Elastic File System

  • EFS provides scalable file storage for EC2 instances
  • It is mainly used for shared file storage: many instances mount the same file system
  • Common uses are big data, analytics, and web serving
  • An EBS volume usually attaches to one instance at a time
  • 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 runs a relational database for you
  • Seven engines: Aurora, PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, and Db2
  • AWS handles backups, patches, and updates
  • You get a hostname and a port, but no ssh
  • Multi-AZ keeps a standby copy in another zone and switches to it on failure
  • Related services:
    • Athena runs SQL on files in S3, with no database server
    • Redshift is for data warehousing
    • DynamoDB is for NoSQL

Amazon SageMaker AI

When AWS has a bad night

19 October 2025, us-east-1

  • Two DynamoDB programs updated the same Domain Name System (DNS) record at once, a race condition
    • DNS turns a name like amazon.com into an IP address
  • One wrote an old version late, and the other’s clean-up deleted it
  • So dynamodb.us-east-1.amazonaws.com pointed nowhere
  • EC2 launches, load balancers, and console sign-in also failed
  • Recovery took about fifteen hours
  • Snapchat, Fortnite, Signal, banks and more went down, and 17 million people reported problems

  • CyberCube estimated insured losses of $38 million to $581 million
  • Reliability is still your job: don’t keep everything in one region!

Creating and managing an AWS account 🛠️

Creating an AWS account

  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

  • You start with $100 in credits and can earn up to $100 more in the console
  • The plan ends after six months or when the credits run out
  • AWS says you will not be charged unless you convert to a paid plan
  • Some services are blocked on the free plan
  • Everything this course needs fits inside it

When the free plan ends, the account closes on its own. AWS deletes everything 90 days later unless you upgrade. 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

Budgets update up to three times a day, so the email can arrive hours 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. The best protection is to terminate what you start

Reading a scanned document

Amazon Textract

  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 text detection and 100 of layout, forms or tables, for three months. Read the pricing page before a large run

What you can ask for

  • 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

Every block comes with a score

  • Textract returns blocks in reading order, each with a type
  • Page 8 has a header, a list, and eleven text blocks
  • The header reads “SCHEDULE FOR HILLARY RODAHM CLINTON”
  • The typo is in the 2001 original, so a search for “Rodham” would miss this page
  • Scores ran from 28% to 92%. They rate the block type, not the spelling
  • The Raw text tab gives a plain transcript
  • The appendix transcribes audio with Amazon Transcribe

The Layout tab, page 8 of 10

Conclusion

What we learned today

  • Why cloud computing matters to a business
  • The Big Three: AWS, Azure, and Google Cloud
  • The service types: IaaS, PaaS, SaaS, FaaS
  • Popular AWS services: EC2, S3, RDS, SageMaker
  • How to open an AWS account and set a zero-spend budget
  • How to read a scanned PDF with Amazon Textract
  • Delete your S3 bucket if you ran the Transcribe appendix!

Next class

  • We launch an EC2 instance and connect to it over SSH with a key pair
  • The key pair is a file on your laptop, and it never goes into Git
  • Bots scan public repositories for AWS keys
  • The instance runs Ubuntu Linux, so the shell commands work there
  • We install software with apt, copy files with scp, and run a Python script
  • We finish by terminating it, so the bill stays at zero
  • The final project is released the same day

Before then:

  1. Create your AWS account
  2. Set the zero-spend budget
  3. Check that ssh runs: type ssh -V in your terminal
    • Mac: open Terminal
    • Windows: use the WSL terminal. If ssh is missing, run sudo apt install openssh-client

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

Appendix: Amazon Transcribe 🎤

Audio transcription at scale

  • Imagine a task like the Washington Post’s, but with audio files to transcribe quickly
  • We create an S3 bucket, upload an audio file, and transcribe it
  • The file we will use is available here: transcribe-sample.mp3
  • Open the AWS Management Console and search for S3
  • Click 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

  • Open Amazon Transcribe, or search for Transcribe
  • Click Transcription jobs in the left sidebar, then 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