CSC301Semester 5 • 3 CreditsSpecialization Subjects

Introduction To Cloud Computing

An introductory course on cloud computing using AWS, covering core concepts, EC2/EBS, storage, VPC networking, database services, IAM, monitoring tools, DNS routing, and the reliability and security pillars for designing secure, resilient cloud architectures.

6 Units • Notes • Model Answers • MCQs
Select Course Unit (6 Units)
Active: Unit 1
Unit 1:Introduction to Cloud Computing and AWS; Amazon EC2 and Amazon EBS
12 min read•High-Yield Unit Guide

Introduction to Cloud Computing and AWS; Amazon EC2 and Amazon EBS

Unit 1 Exam Focus & Core Takeaways

Review the core definitions, standard architectures, and syntax patterns below. Pay special attention to sections highlighted with bullet points for your mid-term and end-term subjective questions.

Unit 1: Introduction to Cloud Computing and AWS; Amazon EC2 and Amazon EBS

1. Introduction: The Shift to Cloud Computing

Before the emergence of cloud computing, running software required substantial capital expenditure (CapEx). Organizations purchased physical server racks, configured uninterrupted power supplies (UPS), installed cooling equipment, and maintained dedicated disaster recovery facilities. Estimating hardware demand was challenging: under-provisioning caused system crashes during peak traffic, while over-provisioning resulted in idle, depreciating computing capacity.

Cloud computing transforms IT infrastructure from fixed physical assets into operational expenditure (OpEx). Organizations lease compute, networking, and storage resources on-demand across high-speed internet connections, paying exclusively for what they consume.


2. Fundamental Cloud Concepts & NIST Characteristics

The National Institute of Standards and Technology (NIST) defines cloud computing through five essential characteristics:

  1. On-Demand Self-Service: Users provision compute resources, storage volumes, and network components programmatically or via a management console without human intervention from the service provider.
  2. Broad Network Access: Capabilities are available over the network and accessed through standard mechanisms compatible with varied client platforms (browsers, mobile devices, command-line interfaces).
  3. Resource Pooling: The provider's computing resources are pooled to serve multiple consumers in a multi-tenant model. Physical and virtual resources are dynamically assigned and reassigned according to demand, with location independence.
  4. Rapid Elasticity: Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand.
  5. Measured Service: Resource usage is monitored, controlled, and reported transparently for both the provider and consumer (e.g., pay-per-second billing for compute, gigabyte-month for storage).

Cloud Service Models

  • Infrastructure as a Service (IaaS): Provides raw computing building blocks—virtual machines, storage volumes, and network routing. The customer controls the operating system, middleware, and installed applications (e.g., Amazon EC2, Amazon EBS).
  • Platform as a Service (PaaS): Abstracts underlying hardware, OS patching, and network maintenance. The customer manages only application code and configuration parameters (e.g., AWS Elastic Beanstalk).
  • Software as a Service (SaaS): Delivers fully functional applications managed end-to-end by the service vendor (e.g., Microsoft 365, Salesforce).

Cloud Deployment Models

  • Public Cloud: Resources are owned and operated by a third-party cloud provider and delivered over the public internet (e.g., AWS, Microsoft Azure, GCP).
  • Private Cloud: Cloud infrastructure provisioned for exclusive use by a single organization comprising multiple consumers, hosted either on-premises or by a third party.
  • Hybrid Cloud: Combines public and private infrastructures with technology enabling data and application portability.

3. The AWS Global Infrastructure

AWS delivers its global services across a hierarchy designed for high availability and low latency:

  • Regions: Geographic areas around the globe containing multiple physically isolated data centers (e.g., us-east-1 in N. Virginia, ap-south-1 in Mumbai). Each Region operates completely independently.
  • Availability Zones (AZs): One or more discrete data centers with redundant power, networking, and connectivity within an AWS Region (e.g., ap-south-1a, ap-south-1b). AZs are interconnected via low-latency, private fiber-optic networking. Deploying across multiple AZs provides fault tolerance.
  • Edge Locations & Points of Presence (PoPs): Distributed edge points worldwide that cache data closer to end-users for Amazon CloudFront (CDN) and route traffic using Amazon Route 53.

4. Virtualization and the AWS Nitro System

Virtualization allows multiple guest operating systems to execute concurrently on a single physical host:

  • Type 1 (Bare-Metal) Hypervisor: Executes directly on the underlying physical hardware without an intermediary host OS (e.g., VMware ESXi, KVM).
  • Type 2 (Hosted) Hypervisor: Operates as an application atop an existing host operating system (e.g., Oracle VirtualBox).
  • AWS Nitro System: Modern AWS virtualization architecture. Dedicated Nitro PCIe cards offload network processing, storage management, security monitoring, and hypervisor tasks from the main CPU, allowing nearly 100% of host CPU and memory to be allocated to customer EC2 virtual machines.

5. Amazon Elastic Compute Cloud (EC2)

Amazon EC2 provides scalable computing capacity in the AWS Cloud. It eliminates the need to invest in hardware up front, enabling rapid development and deployment.

EC2 Instance Types

Instances are grouped into optimized families:

  • General Purpose (t, m families): Balanced compute, memory, and networking resources. Ideal for web servers, dev environments, and small enterprise databases.
  • Compute Optimized (c family): High performance-to-price compute ratio for batch processing, media transcoding, scientific modeling, and dedicated gaming servers.
  • Memory Optimized (r, x families): Large memory footprints designed for in-memory databases (Redis, SAP HANA) and real-time big data processing.
  • Accelerated Computing (p, g families): Hardware accelerators (GPUs, FPGAs) for deep learning training, inference, and 3D graphics rendering.
  • Storage Optimized (i, d families): Low latency, high sequential read/write operations for distributed file systems and data warehousing.

EC2 Instance Lifecycle States

  1. Pending: Preparing the virtual machine (allocating hardware, configuring network interfaces).
  2. Running: Active and functional. Billing accumulates.
  3. Stopping: Graceful shutdown initiated. Compute billing ceases; attached EBS root volumes remain and incur storage fees.
  4. Stopped: Fully powered down. Instance properties can be modified.
  5. Shutting-down: Transition state toward permanent deletion.
  6. Terminated: Instance destroyed. Associated ephemeral storage is erased; EBS root volume is deleted unless configured with DeleteOnTermination=false.

Placement Groups

Placement groups influence how instances are distributed across physical host hardware:

  • Cluster: Packs instances close together inside a single Availability Zone. Delivers low-latency network performance and high throughput (ideal for HPC and tightly coupled MPI applications).
  • Spread: Strictly places each instance on distinct underlying hardware racks, power supplies, and network paths. Maximum 7 running instances per AZ per group. Recommended for mission-critical individual instances.
  • Partition: Divides the group into logical partitions; each partition gets its own set of racks. Instances in one partition do not share hardware with instances in other partitions (ideal for distributed databases like Cassandra, Kafka, and HDFS).

EC2 Purchasing Models

ModelDescriptionPrimary Use Case
On-DemandPay fixed hourly or per-second rate without upfront commitment.Unpredictable workloads, short-term testing, initial development.
Savings PlansCommit to consistent compute usage ($/hour) over 1 or 3 years.Flexible, steady-state usage across EC2, Fargate, and Lambda.
Reserved Instances (RI)Commit to specific instance configurations for 1 or 3 years (Standard or Convertible).Predictable, steady-state production database and application workloads.
Spot InstancesBid on spare AWS compute capacity with up to 90% discount. AWS can reclaim with 2-minute warning.Fault-tolerant, stateless batch workloads, CI/CD runners, rendering farms.
Dedicated HostsPhysical server fully dedicated to a single customer account.Regulatory compliance, strict server-bound software licensing (BYOL).

6. EC2 Storage: EBS vs. Instance Store

Amazon Elastic Block Store (EBS)

EBS provides persistent, block-level storage volumes for use with EC2 instances. Each volume is automatically replicated within its Availability Zone to protect from component failure.

  • General Purpose SSD (gp2, gp3): Default balance of price and performance. gp3 enables independent provisioning of IOPS and throughput without adding volume capacity.
  • Provisioned IOPS SSD (io1, io2, io2 Block Express): Sub-millisecond latency for mission-critical I/O-intensive database applications.
  • Throughput Optimized HDD (st1): Low-cost magnetic storage optimized for frequently accessed, sequential throughput workloads (e.g., log processing, big data clusters).
  • Cold HDD (sc1): Lowest cost block storage for infrequently accessed sequential workloads.

EBS Snapshots

Incremental, point-in-time backups stored reliably in Amazon S3. The first snapshot saves the full block volume; subsequent snapshots capture only blocks modified since the last backup.

EC2 Instance Store

Temporary, block-level storage physically attached to the host server.

  • Characteristics: Extremely high IOPS and low latency.
  • Ephemerality: Data is lost if the instance stops, terminates, or underlying drive hardware fails. Survives only OS reboots. Ideal for scratch space, temporary caches, and replicated state.

7. EC2 Security & Access Management

  • Key Pairs: Asymmetric cryptographic keys (public key stored on EC2 instance inside ~/.ssh/authorized_keys, private key kept secret by the administrator). Enables passwordless SSH access for Linux (ssh -i key.pem ec2-user@<ip>) and decrypts the initial Administrator password for Windows RDP.
  • Security Groups: Act as virtual firewalls at the instance level. Stateful filtering: return traffic is automatically permitted regardless of inbound rules. Evaluates all rules before deciding to permit traffic. Supports Allow rules only.
  • IAM Instance Profiles: Securely attach AWS Identity and Access Management (IAM) roles to EC2 instances, eliminating hard-coded credentials in scripts or application code.

8. Common Pitfalls & Exam Tips

  1. Security Groups vs. NACLs: Remember that Security Groups operate at the instance level and are stateful. Network ACLs (NACLs) operate at the subnet level and are stateless (explicit outbound rules are required).
  2. Reboot vs. Stop on Instance Store: An OS reboot does NOT erase Instance Store data. However, stopping or terminating the instance wipes all data permanently.
  3. Cluster Placement Across AZs: A Cluster placement group CANNOT span multiple Availability Zones; it is confined to a single AZ to deliver high-bandwidth, low-latency interconnects.
  4. gp2 vs gp3 Performance: In gp2, IOPS scales linearly with allocated storage size (3 IOPS per GB). In gp3, IOPS and throughput can be adjusted independently of disk size.

9. Quick Revision Summary

  • Cloud computing delivers elastic compute, storage, and networking with on-demand pricing across 5 core NIST attributes.
  • AWS infrastructure is arranged into Regions, Availability Zones, and global Edge Locations.
  • EC2 provides resizable virtual compute capacity, managed across diverse instance families and purchase options (On-Demand, Reserved, Savings Plans, Spot, Dedicated).
  • EBS provides persistent block storage replicated within an AZ; Instance Store provides high-speed, non-persistent local block storage.
  • Security Groups provide stateful firewall filtering at the virtual network interface level.