Lec 2: AWS Intro Flashcards

1
Q

What is the core technique of cloud computing?

A

Virtualization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What if the machine needs to be shut down for maintenance?

A

Virtual machine live migration: Alice can migrate the running VMs to different physical machines without interrupting any customers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What should Alice do?

Suppose Alice has a machine with 16 CPUs and 64 GB of memory. There are three customers:
Bob wants a machine with 8 CPUs and 32 GB of memory
Charlie wants a machine with 8 CPUs and 32 GB of memory
Daniel wants a machine with 4 CPUs and 8 GB of memory

A

Virtualization: Alice installs a virtual machine monitor (VMM) and provides each customer with a guest OS/virtual machine (VM) and the requested resources as vCPUs and guest physical memory.

Ex: Bob will be assigned with 8 vCPUs and 32GB of guest physical memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can customers access other customers data?

A

No because of VM isolation: One customer cannot access data of another customer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How is virtualization implemented?

A

-VMM (“Hypervisor”) has translation tables that map virtual (guest) memory to physical memory

Example:
VM 1 accesses memory cell #0; VMM maps this to memory cell #0
VM 2 accesses memory cell #0; VMM maps this to memory cell #300.

-VMs also time-share CPUs (a time-multiplexed manner)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Time-multiplex does not work for memory. Why?

A

-Memory cannot be overlapped
-Other users are not supposed to access other memory spaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What if Alice serves more customers?

A

-Existing customers will be allocated less shares, thus performance will be affected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Benefits of virtualization

A

Flexible to cloud providers, who
-can generate VMs with different resource capabilities
-can migrate VMs if necessary (e.g., for maintenance)
-can increase load by overcommitting resources

Secure to VMs
-One VM cannot access another without permission

Convenient to customers
- Complete control over the virtual ‘hardware’ (can install their own operating systems, applications, …)

But there might be performance impacts
-Load changes in one VM may affect the performance of another VM on the same physical machine (e.g., Bob is allowed to increase his vCPUs from 8 to 16.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Amazon: the pioneer (Timeline)

A

Jul 2002
Amazon Web Services launched

Mar 2006
Amazon S3 (Simple Storage Service) launched
-Proposed the ‘pay-per-use’ business model, which is now the standard in cloud computing

Aug 2006
Amazon EC2 (Elastic Compute Cloud) launched

Nov 2009
Microsoft Azure Beta launched
-Microsoft’s online services are gradually transitioning to Azure

Dec 2013
Google Compute Engine launched

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What services does a cloud provide? (3 common types)

A

Software as a service (SaaS)
SaaS delivers fully functional software on a subscription basis.

Platform as a service (PaaS)
PaaS provides a platform and pre-configured environment for users to develop their software.

Infrastructure as a service (IaaS)
IaaS offers basic computing resources such as virtual machines, storage, and network bandwidth.

Other XaaS: anything as a service (less common)
-Desktop as a service (DaaS)
-Network as a service (NaaS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is SaaS? Give an example.

A

SaaS: Cloud provides an entire application

Email, Drive, Doc, Slides,…
Example: Google Workspace

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is PaaS? Give an example.

A

PaaS: Cloud provides middleware

Common Language Runtime environment
Example: Heroku

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is IaaS? Give an example.

A

IaaS: Cloud provides hardware resources

Virtual Machines, Virtual Memory, Virtual Disk,…
Examples: AWS Elastic Compute Cloud (EC2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Types of cloud in terms of target customers

A

Public cloud: open to general public.
Example: AWS, Microsoft Azure, Google Compute Engine

Community cloud: shared by multiple organizations with common interests and requirements.
Example: Healthcare Sectors

Private cloud: exclusively used by a single organization.
Example: Google’s internal datacenter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is XaaS cloud computing? Describe the different categories of XaaS cloud computing can provide and specific examples of each service.

A

Cloud computing offers a range of services, referred to as “XaaS,” which stands for “Anything as a Service.”

-Infrastructure as a Service that provides virtualized computing resources. An example is AWS EC2.

-Platform as a Service that provides a runtime environment for developers to build, deploy, and manage applications. An examples is Google App Engine or Heroku.

-Software as a Service that delivers fully functional software applications. An example is Microsoft 365 office or Google workplace.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Examples of cloud services provided by AWS

A

Analytics
Application Integration
AWS Cost Management
Blockchain
Business Applications
Compute
Containers
Customer Enablement
Database
Developer Tools
End User Computing
Front-end Web & Mobile
Game Development
Internet of Things
Machine Learning
Management & Governance
Media Services
Migration & Transfer
Networking & Content Delivery
Quantum Technologies
Robotics
Satellite
Security, Identity, & Compliance
Storage

AWS: the leading cloud providing a wide range of services
The services satisfy different needs of customers:
-Allowing us to design, deploy, and manage applications on the cloud, so-called application architecture.
e.g., build a web application

17
Q

What is an application architecture?

A

It is the structural design and organization of a software application.

18
Q

What are the main types of application architecture?

A

Monolithic architecture
Client/Server architecture
Three-tier architecture
Cloud-based serverless architecture

19
Q

What is monolithic architecture? Give an example.

A

combines the frontend, backend, and database functionalities into a single application

e.g., wordpress: a content management system (CMS)

20
Q

What is Client/Server architecture? Give an example.

A

an application is split into two main components:
the client, which handles the user requests, and
the server, which handles the processing of requests and data storage.

e.g., gmail

21
Q

What is Three-tier architecture? Give an example.

A

a presentation tier (frontend),
application logic tier (backend), and
a database tier (backend)

e.g., Shopify: an e-commerce platform.

22
Q

What is Cloud-based serverless architecture? Give an example.

A

known as Function-as-a-Service, which is a cloud computing model where the cloud provider provisions, maintains and scales applications.

e.g., AWS Lambda

23
Q

Deploying a cloud application
When an application is ready, it can be deployed onto AWS via different services. What are these services?

A

Elastic Compute Cloud (EC2): an EC2 instance is a virtual machine that runs a Windows or Linux server. It is essentially running on Virtual Machine Monitor (VMM).

Elastic Container Service (ECS): a customized environment provided by an EC2 instance.

24
Q

Describe the main steps which you would take on AWS and the decisions that would need to be made to create, configure and launch an EC2 Instance.

A

Sign in to the AWS management console

Navigate to EC2 Dashboard and click “Launch instance”

Select/Create names and tags
–“Name and tags”: In this step, we add a tag for the instance, e.g., Key: Name, Value: 00000000-vm. We can click the “Add new tag” button to add multiple tags as needed.

Select AMI and Instance type
–“Application and OS Images (Amazon Machine Image)”: In this step, we select an AMI that suits our requirements.
–“Instance type”: In this step, we select an appropriate instance type. (t2.micro)

Select/Create Key pair for login
–“Key pair (login)”: In this step, we can select/create a key pair (SSH key) for secure access to our first instance.

Configure network settings and storage
–Create security group: a security group is a set of firewall rules that control the network traffic for our instance.
–“Configure storage”: In this step, we specify storage volume for our instance. By default, one EBS volume is attached to the instance. We can add more EBS volumes if needed.
—-EBS setting
–“Advanced details”
—-Instance purchasing options
—-IAM: a service that allows us to manage users, groups, and permissions to securely control access to AWS resources.

Review and launch

25
Q

Describe EBS and what features it offers

A

EBS is a ‘virtual disk’ and allocated in volumes. A volume ranges from 1GB to 1TB.
It provides block level storage volumes for EC2 instances. It is attached to any instance in the same Availability Zone. We pay for what we use with EBS.

Features:
Persistent Storage: EBS volumes persist independently from EC2 instances, indicating that when an instance is terminated, the data stored on the attached EBS volume CAN be retained.

High availability: EBS replicates volumes data across multiple physical servers within the same availability zone to prevent the loss of data from hardware failures.

Snapshots: allows users to create point-in-time snapshots of their volumes. These snapshots serve as backups and can be used to restore volumes to a previous state.

Elastic volumes : allows users to dynamically adapt their volumes when the needs of their applications change.

26
Q

What is an availability zone?

A

Availability zone: A region is further divided into multiple availability zones, which are identified by additional letters such as “us-west-2a” and “us-west-2b”.

Zones represent data centers in different physical locations within a region.

Each zone within a region is networked with low-latency connections

27
Q

What are the instance purchasing options available under advanced details when creating an EC2 instance?

A

On-Demand Instances
Savings Plans
Reserved Instances
Spot Instances
Dedicated Hosts
Dedicated Instances
Capacity Reservations

28
Q

What is the principle of least privilege?

A

A user only has those privileges which are essentially vital to perform their intended operations.

29
Q

Lab1: Configure AWS

A

aws configure

will output, need to enter every line
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: ap-southeast-2
Default output format [None]: json

30
Q

Lab1:
Test the AWS environment

Test the Python environment

A

aws ec2 describe-regions –output table

python3
»> import boto3
»> ec2 = boto3.client(‘ec2’)
»> response = ec2.describe_regions()
»> print(response)

31
Q

Lab1: Install Python 3.8.x

A

sudo apt update
sudo apt -y upgrade

python3 -V

sudo apt install -y python3-pip

Python packages can be installed by: pip3 install package_name

32
Q

Lab1: Install awscli

A

sudo apt install awscli
pip3 install awscli –upgrade

OR sudo snap install aws-cli –classic

33
Q

Lab1: Install boto3

A

pip3 install boto3