Cloud Computing Notes
Cloud Computing Notes
Cloud Computing is the on-demand delivery of IT resources (like computing power, storage,
databases, applications, etc.) over the internet with pay-as-you-go pricing. Instead of buying, owning,
and maintaining physical data centers and servers, you can access technology services from a cloud
provider.
The cloud architecture is typically broken down into three main service models, forming a vertical
stack:
o Concept: Provides ready-to-use software applications over the internet. Users access
the software via a web browser or client application. The provider manages all
underlying infrastructure, operating systems, and application software.
o Examples: Amazon EC2, Microsoft Azure Virtual Machines, Google Compute Engine
(GCE).
1. Public Cloud: Services offered by third-party providers over the public internet. Available to
anyone who wants to buy them.
o Benefits: High scalability, low cost (pay-as-you-go), zero maintenance for the user.
o Examples: AWS, Azure, Google Cloud.
2. Private Cloud: Services maintained on a private network, often using the organization's own
data center. The services are only available to a single organization.
3. Hybrid Cloud: A combination of a public cloud and a private cloud, bound together by
technology that allows data and applications to be shared between them.
o Benefits: Flexibility to use public cloud for non-sensitive data and private cloud for
core, highly secure operations.
On-Demand Self-Service: Users can provision computing capabilities (e.g., server time,
network storage) automatically without human interaction with the service provider.
Broad Network Access: Capabilities are available over the network and accessed through
standard mechanisms (e.g., web browsers, mobile devices).
Resource Pooling: The provider's computing resources are pooled to serve multiple
consumers using a multi-tenant model. Resources are dynamically assigned and reassigned
according to demand.
Rapid Elasticity: Capabilities can be rapidly and elastically provisioned and released to scale
quickly outward and inward commensurate with demand. From the consumer's perspective,
the resources available for provisioning often appear to be unlimited.
Measured Service: Cloud systems automatically control and optimize resource use by
leveraging a metering capability. This allows for transparency for both the provider and the
consumer (pay-per-use model).
Benefits (Advantages)
High Availability and Reliability: Services are typically spread across multiple data centers,
ensuring redundancy and minimal downtime.
Scalability and Elasticity: Resources can be scaled up or down quickly and automatically to
meet fluctuating demand.
Mobility: Users can access data and applications from virtually anywhere with an internet
connection.
Disaster Recovery: Built-in backup and recovery features that are often more cost-effective
and robust than traditional solutions.
Disadvantages
Security Concerns: Loss of physical control can raise security and privacy concerns, especially
for sensitive data. Trusting the provider's security measures is essential.
Vendor Lock-in: Difficulty migrating services, applications, and data from one cloud provider
to another due to proprietary technologies or high migration costs.
Limited Control: Users have less control over the underlying hardware, operating systems,
and network infrastructure (especially in SaaS/PaaS).
Downtime/Outages: Reliance on the internet means connectivity issues can halt operations.
Cloud providers can suffer from widespread outages, impacting all dependent users.
Compliance: Meeting specific industry regulations (like HIPAA, GDPR) can be complex when
data resides in a third-party, multi-tenant environment.
This refers to the administration, monitoring, and optimization of resources across (Inter) or within
(Intra) cloud environments.
Intra-Cloud Management: Focuses on managing resources and services within a single cloud
provider's environment (e.g., monitoring VM performance, optimizing storage costs,
managing network traffic on AWS). Tools are typically provided by the cloud vendor itself.
o Unified Monitoring and Billing: Gaining a single view of performance and costs
across all clouds.
Concept: Provides raw computing infrastructure (virtual machines, storage, networks) over
the internet.
User Responsibility: The user is responsible for the operating system, all application
software, data, and security within the VM instance.
Provider Responsibility: The cloud provider manages the underlying physical infrastructure,
servers, virtualization layer (hypervisor), and data center facilities.
Key Features:
o Virtual Machines (VMs): The basic unit of compute.
o Storage: Block storage (like virtual disks), object storage (like AWS S3), and file
storage.
o Networking: Virtual private clouds (VPCs), subnets, load balancers, and firewalls.
Flexibility: IaaS offers the highest level of flexibility and control to the user compared to
PaaS and SaaS, but also requires the user to manage more components.
Abstraction is the fundamental principle behind virtualization. It hides the complexity of the
underlying physical hardware from the user or the operating system, presenting a simplified,
virtualized version of the resources.
Virtualization is the cornerstone of IaaS (Infrastructure as a Service) and the multi-tenancy model:
1. Resource Pooling: It enables cloud providers to pool vast resources and share them among
many users (tenants) efficiently and securely.
2. Isolation: Virtual machines (VMs) are isolated from one another, ensuring that a problem in
one VM doesn't affect others on the same physical hardware.
3. Encapsulation: A VM is encapsulated into a set of files, making it easy to save, copy, and
move the entire virtual environment.
4. Hardware Independence: VMs can be moved between different types of physical hardware
without modification, facilitating live migration and dynamic load balancing.
Load Balancing
Load Balancing is the process of distributing incoming network traffic across a group of backend
servers (or VMs) to ensure no single server is overworked. This enhances:
Global vs. Regional: GCP Load Balancers can be Global (distributing traffic across regions,
useful for web apps) or Regional (distributing traffic within a single region).
Types: GCP offers L7 (Application Layer - HTTP/S, uses routing logic) and L4 (Network Layer -
TCP/UDP, fast and simple) load balancers.
Integration with Virtualization: Load balancers distribute traffic across a group of Virtual
Machine Instances (VMs), ensuring that the pool of virtualized resources is used efficiently
and remains highly available. The virtualization layer (Hypervisor) handles the partitioning of
resources for each VM, while the load balancer handles the distribution of requests across
those VMs.
A Hypervisor (also known as a Virtual Machine Monitor - VMM) is the critical software layer that
creates and runs Virtual Machines (VMs). It manages the host machine's resources and allocates
them to the guest VMs.
Types of Hypervisors
o Concept: Runs directly on the host hardware, without a host operating system. It
manages the hardware resources (CPU, memory, storage) and provides them directly
to the guest OSs.
o Characteristics: Highly efficient, very fast, and extremely secure because it's isolated
from the OS.
o Use Case: Enterprise data centers and public cloud infrastructure (IaaS).
o Examples: VMware ESXi, Microsoft Hyper-V (server role), Xen, KVM (Kernel-based
Virtual Machine, often used in Linux).
o Concept: Runs on top of a traditional host operating system (like Windows, macOS,
or Linux) as a software application.
o Characteristics: Easier to install and use for end-users, but less efficient than Type 1
because resources must pass through the host OS layer.
VMs can also be categorized based on how they interact with the hypervisor:
Full Virtualization: The hypervisor completely simulates the underlying hardware, allowing
an unmodified guest OS (even proprietary OSs like Windows) to run. The hypervisor
intercepts all privileged instructions. (Used by many Type 1/2 hypervisors).
Paravirtualization: The guest OS is modified (or "paravirtualized") to include calls that
explicitly communicate with the hypervisor. This results in much better performance than full
virtualization but requires OS modification. (Used by Xen).
This covers the practical application and key players in the two core service models.
Key Features:
o Database: Uses its own proprietary database model for simplified data management.
Concept: EC2 provides secure and resizable compute capacity in the cloud in the form of
Virtual Machine Instances. It allows users to rent virtual servers on demand.
Key Features:
o Instances: Users choose from various instance types optimized for compute,
memory, or storage.
o AMIs (Amazon Machine Images): Templates containing the OS, application server,
and applications required to launch an instance.
o Elasticity: Instances can be launched, terminated, scaled up, and scaled down
automatically via auto-scaling groups to meet demand.
o Storage (EBS): Instances use Elastic Block Store (EBS) volumes for persistent storage,
which can be detached and reattached to different instances.
This unit focuses on the specific platforms and tools developers use to build and deploy applications
in the cloud, primarily within the PaaS (Platform as a Service) model.
Export to Sheets
Google App Engine (GAE) is a prominent example of a PaaS offering from Google Cloud Platform
(GCP). It enables developers to build and host web applications without managing the underlying
infrastructure.
1. Automatic Scaling: GAE automatically scales application instances based on incoming traffic.
Developers focus only on code, not server management.
3. Supported Languages: Supports various runtimes like Python, Java, [Link], Go, Ruby, PHP,
and custom runtimes.
4. NoSQL Database: Uses the highly scalable Cloud Datastore (now Firestore), a NoSQL
document database, which is key to its elasticity.
AWS provides a vast and flexible set of services for programming and deployment, primarily
leveraging the IaaS model (EC2) but offering rich PaaS tools.
Elastic Compute Cloud (EC2): As IaaS, EC2 requires developers to provision and manage
Virtual Machines, allowing complete control over the OS and runtime environment.
PaaS Services (Elastic Beanstalk): AWS Elastic Beanstalk is a PaaS layer that automatically
handles the deployment, capacity provisioning, load balancing, and auto-scaling of
applications written in common languages (Java, .NET, PHP, [Link], Python, Ruby).
Developers simply upload their code.
Microsoft Azure is a comprehensive cloud platform offering a blend of IaaS, PaaS, and SaaS
capabilities, deeply integrated with Microsoft development tools.
Azure App Service (PaaS): A fully managed platform for building, deploying, and scaling
enterprise-grade web, mobile, and API apps. Similar to AWS Elastic Beanstalk and GAE. It
supports popular programming stacks (.NET, Java, [Link], etc.).
Azure Virtual Machines (IaaS): Provides IaaS resources, supporting Windows and Linux VMs.
Azure Functions (FaaS): Azure's serverless compute offering, equivalent to AWS Lambda,
allowing event-driven scaling of individual functions.
Azure DevOps: A set of developer services (including Boards, Repos, Pipelines) to support
the complete DevOps lifecycle in the cloud, enabling continuous integration and continuous
delivery (CI/CD).
The cloud programming environment is constantly evolving, with a strong focus on automation,
portability, and decoupling services.
1. Serverless Computing (FaaS): The environment completely abstracts the server. Developers
upload functions, which run only when triggered by an event, and bill only for the compute
time consumed. (e.g., AWS Lambda, Azure Functions, GCP Cloud Functions).
2. Containerization (Docker and Kubernetes): Containers package an application and all its
dependencies, ensuring it runs reliably regardless of the environment. Kubernetes is the
industry standard for container orchestration, managing the deployment, scaling, and
networking of containers across clusters.
4. DevOps and CI/CD: Emphasis on tools and practices that automate the pipeline from code
commit to deployment (Continuous Integration/Continuous Delivery), reducing human error
and increasing deployment frequency.
Unit IV: Deploying Applications and Cloud Services
This unit focuses on the practical aspects of moving software to the cloud and managing services at
scale.
Migrating an existing application from an on-premises data center to a cloud environment involves
strategic decisions about how much the application needs to be changed. This is often summarized
by the "6 R's" of Cloud Migration:
1. Rehost (Lift and Shift): Moving an application and its data as is to the cloud's IaaS
environment (e.g., migrating an on-premises VM to an AWS EC2 instance). This is the fastest
method but offers minimal cloud optimization benefits.
2. Replatform (Lift, Tinker, and Shift): Making a few simple, non-code changes to optimize the
application for the cloud. This might involve replacing an on-premises database with a
managed cloud database service (PaaS) to gain benefits like automated patching.
4. Repurchase (Drop and Shop): Moving from a custom application to a cloud-based SaaS
product (e.g., replacing an internal CRM with Salesforce).
5. Retain (Revisit): Keeping some applications on-premises if they are critical, non-cloud-
compliant, or have high migration costs.
Microservices Architecture is the dominant pattern for building modern cloud-native applications.
Contrast with Monolith: Traditional applications are built as a single, large, inseparable unit
(monolith).
Cloud Benefits:
o Independent Deployment: Each service can be updated without affecting the entire
application.
Key Cloud Services Used: Container orchestration (Kubernetes), API Gateways, Service
Meshes (for communication).
Google Cloud Platform (GCP) offers a comprehensive suite of application services, from IaaS to
serverless and AI-driven tools.
Compute Engine (IaaS): Offers customizable Virtual Machines (VMs) and persistent storage.
App Engine (PaaS): Fully managed platform for web and mobile application development
with automatic scaling.
Kubernetes Engine (GKE): Managed service for running containerized applications using the
Kubernetes orchestrator.
Amazon Web Services (AWS) is the largest cloud provider, offering the broadest array of services.
Compute:
Storage:
o EBS (Elastic Block Store): Persistent block storage for EC2 instances.
Database:
Networking:
o VPC (Virtual Private Cloud): Isolated private network within the AWS cloud.
Cloud applications are software that is accessed over the internet, often using a browser, and where
the infrastructure and data reside on a cloud provider's servers.
Examples:
o ERP (Enterprise Resource Planning): SAP S/4HANA Cloud, Oracle Cloud ERP.
o Office Productivity Suites: Google Workspace (Docs, Sheets), Microsoft 365 (Word,
Excel).
Advantages: Automatic updates, reduced hardware costs, global accessibility, and instant
collaboration capabilities.
This unit covers the newest architectural shifts and technologies shaping the future of cloud
environments.
Using services from two or more A more holistic, unified, and integrated
distinct public cloud providers (e.g., strategy where all clouds (public, private, edge)
Concept
AWS for compute, Azure for are managed as a single, seamless
database). environment.
Export to Sheets
Benefit: Ideal for supply chain management, inter-bank settlement, and healthcare data
sharing where multiple known parties need a shared, tamper-proof record without needing
the full transparency of a public chain.
5.3 Kubernetes
Kubernetes (K8s) is the industry-standard, open-source platform for automating the deployment,
scaling, and management of containerized applications.
Role in Cloud: It acts as an abstraction layer, turning a cluster of virtual machines (IaaS) into a
single, unified compute resource pool. This is fundamental to implementing Multi-Cloud and
Microservices architectures.
Key Functions:
o Service Discovery: Allows containers to find and communicate with each other.
Managed Services: All major cloud providers offer managed Kubernetes services (AWS EKS,
Azure AKS, GCP GKE), significantly simplifying its operation.
5.4 Cloud AI
Cloud AI refers to the delivery of Artificial Intelligence and Machine Learning services via the cloud,
transforming complex models into accessible APIs and services.
Key Services:
o AI Services (Pre-trained Models): APIs for Computer Vision (image recognition),
Natural Language Processing (translation, sentiment analysis), and Speech
recognition.
Benefit: Massively reduces the cost, time, and computational barrier to adopting AI in
business applications.
Intelligent SaaS (iSaaS) refers to traditional SaaS applications that are deeply integrated with AI and
ML capabilities to provide enhanced functionality, automation, and predictive insights.
Examples:
o CRM (Salesforce Einstein): Uses ML to prioritize sales leads and predict customer
churn.
Impact: Shifts SaaS from merely being a tool for managing data to a proactive system that
drives business decisions and automates complex cognitive tasks.
This refers to the industry consensus that Kubernetes has become the operating system of the
cloud.
Reasoning: K8s provides a standard, portable layer of abstraction that runs on any
infrastructure (AWS, Azure, GCP, or private data centers). This solves the problem of
application portability and makes it easier for enterprises to pursue multi-cloud and hybrid
cloud strategies.
Impact on IaaS: While IaaS provides the raw compute power (VMs), K8s manages what runs
on those VMs. It abstracts the differences between providers, allowing organizations to treat
the underlying VMs as a fungible resource.
This highlights the large-scale adoption and integration of containerization technology (specifically
Docker for packaging and Kubernetes for orchestrating) by major enterprises.
Shift from VMs: While VMs virtualize the hardware, containers virtualize the operating
system. Containers are lighter, faster to deploy, and more resource-efficient than VMs.
Industry Adoption: Banks, telecoms, manufacturing, and e-commerce giants have shifted
core legacy and new applications into containers managed by K8s to achieve:
o Faster Deployment: Continuous Integration/Continuous Delivery (CI/CD) pipelines
accelerate time-to-market.
o Resource Efficiency: Running many containers on a single VM, reducing cloud costs.
Cloud security is a shared responsibility, complex, and paramount, as the organization's data now
resides in a third-party environment.
Cloud security refers to a broad set of policies, technologies, applications, and controls utilized to
protect virtualized IP, data, applications, services, and the infrastructure of cloud computing.
This is the single most important concept in cloud security. It defines which security tasks are the
responsibility of the Cloud Service Provider (CSP) and which are the responsibility of the Customer.
Responsibility
Cloud Service Provider (CSP) Customer
Area
Model Example
The CSP secures the hardware. The Customer secures the OS and above.
(IaaS)
Model Example The CSP manages almost everything The Customer manages data classification
(SaaS) (OS, network, application code). and user access control.
Export to Sheets
Moving to the cloud introduces unique security challenges that organizations must mitigate:
3. Insecure APIs: Cloud services are accessed via public APIs. If these interfaces are not
properly secured (authentication, authorization, encryption), they become vulnerabilities.
4. Vendor Lock-in and Cloud Sprawl: Difficulty maintaining consistent security policies across
multiple disparate cloud environments (Multi-Cloud challenge).
5. Malicious Insiders: Cloud employees or trusted customer employees may misuse access
rights.
SaaS presents a unique security posture because the customer has the least amount of control,
making security heavily reliant on the CSP.
Key Responsibility: The customer's primary security responsibility is Access Control and
Data Classification.
Challenges:
o Data Ownership and Location: Knowing where the data resides and if the vendor's
location meets regulatory needs.
o Data Leakage: Integrations between SaaS apps can create new pathways for data
exfiltration if permissions are too broad.
o API Security: Ensuring any third-party apps integrated with the SaaS platform are
secure.
Mitigation: Relying on CSP audits (e.g., SOC 2 reports) and enforcing strong IAM policies
(e.g., principle of least privilege) and data encryption before uploading to the SaaS platform.
Security Governance is the framework that ensures an organization's security strategy aligns with its
business strategy and regulatory requirements. In the cloud, this involves defining, implementing,
and monitoring security policies.
Key Activities:
o Oversight: Assigning clear roles and responsibilities for cloud security (a critical part
of addressing the Shared Responsibility Model).
Security Monitoring is essential for detecting threats, anomalies, and policy violations in real-time
within the dynamic cloud environment.
Key Tools/Practices:
o Cloud Native Tools (e.g., AWS CloudTrail, Azure Monitor): Services provided by the
CSP to log and track all API calls, resource changes, and user activity within the cloud
account. This provides an audit trail.
Designing the security framework before deployment is crucial for building a secure cloud
environment.
Key Principles:
o Zero Trust Architecture: Never trust, always verify. Access is granted only after strict
verification, regardless of whether the user or resource is inside or outside the
network perimeter.
o Identity-Centric Security: Making Identity (IAM) the primary control plane, rather
than the network perimeter. All access permissions are based on the user/service
identity.
o Segmentation: Using Virtual Private Clouds (VPCs) and subnets to logically isolate
resources (e.g., separating web servers from database servers) and control traffic
flow with micro-segmentation.