AWS CP StudySlides
AWS CP StudySlides
AWS
CERTIFICATION
JOURNEY
HOW WEBSITES
WORK
WHAT IS A
SERVER
COMPOSED OF?
IT TERMINOLOGY
Public Cloud:
Cloud resources owned and operated by a thirdparty cloud service
provider delivered over the Internet.
Six Advantages of Cloud Computing
Hybrid Cloud:
Keep some servers on premises and extend some capabilities to the Cloud
Measured service:
Usage is measured, users pay correctly for what they have used
Trade capital expense (CAPEX) for operational expense (OPEX)
Pay On-Demand: don’t own hardware
SIX ADVANTAGES
OF CLOUD Reduced Total Cost of Ownership (TCO) & Operational Expense (OPEX)
COMPUTING Benefit from massive economies of scale
Prices are reduced as AWS is more efficient due to large scale
Platform as a Service:
Elastic Beanstalk (on AWS)
Heroku, Google App Engine (GCP), Windows Azure (Microsoft)
Software as a Service:
Many AWS services (ex: Rekognition for Machine Learning)
Storage:
Pay for data stored in the Cloud
Gaming
AWS GLOBAL
INFRASTRUCTURE
AWS Regions
AWS Availability Zones
AWS Data Centers
AWS Edge Locations / Points of Presence
AWS REGIONS
Pricing:
pricing varies region to region and is transparent in the service
pricing page
Each region has many availability zones (usually 3, min is
3, max is 6). Example:
AWS AVAILABILITY ap-southeast-2a
ZONE
ap-southeast-2b
ap-southeast-2c
B. Automatic and quick ability to acquire resources as you need them and release resourses when you no longer need them
C. On-demand availability of computer system resources, especially data storage(cloud storage) and computing power,
without direct active management by the user
D. Change resource types when needed
2. A COMPANY WOULD LIKE TO BENEFIT FROM THE ADVANTAGES OF THE
PUBLIC CLOUD BUT WOULD LIKE TO KEEP SENSITIVE ASSETS IN ITS OWN
INFRASTRUCTURE. WHICH DEPLOYMENT MODEL SHOULD THE COMPANY USE?
A. Private Cloud
B. Public Cloud
C. Hybrid Cloud
3. WHICH OF THE FOLLOWING IS NOT AN ADVANTAGE OF CLOUD
COMPUTING?
C. Go global in minutes
A. On-premises
B. IaaS
C. SaaS
D. PaaS
5. WHICH OF THE FOLLOWING SERVICES HAS A GLOBAL SCOPE?
A. EC2
B. IAM
C. Lambda
D. Rekognition
6. WHICH GLOBAL INFRASTRUCTURE IDENTITY IS COMPOSED OF ONE OR
MORE DISCRETE DATA CENTERS WITH REDUNDANT POWER, NETWORKING,
AND CONNECTIVITY, AND ARE USED TO DEPLOY INFRASTRUCTURE?
A. Edge locations
B. Availability zones
C. Regions
7. AWS REGIONS ARE COMPOSED OF?
B. Latency
C. Capacity availability
D. Pricing
ANSWERS
1-C
2-C
3-B
4-D
5-B
6-B
7-C
8-C
IAM SECTION
IAM = Identity and Access Management, Global service
Root account created by default, shouldn’t be used or shared
IAM: USERS & Users are people within your organization, and can be grouped
GROUPS Groups only contain users, not other groups
Users don’t have to belong to a group, and user can belong to multiple
groups
IAM: PERMISSIONS
Statements consists of
Sid: an identifier for the statement (optional)
lowercase letters
Numbers
non-alphanumeric characters
A. An IAM entity that defines a set of permissions for making AWS service requests, that will be used by AWS services
C. A password policy
A. Infrastructure Security
B. Compliance validation
A. The AWS client can interact with AWS using commands in your command-line shell, while the AWS SDK can interact
with AWS programmatically
B. The AWS SDK can interact with AWS using commands in your command-line shell, while the AWS CLI can interact
with AWS programatically
9. WHICH OF THE FOLLOWING IS AN IAM SECURITY TOOL?
2–A
3–D
4–A
5–B
6–D
7–B
8–A
9-A
EC2 SECTION
EC2 is one of the most popular of AWS offering
AMAZON EC2 -
EC2 = Elastic Compute Cloud = Infrastructure as a Service
It mainly consists in the capability of :
Installing Updates
Installing Software
Downloading common files from the internet
Anything you can think of
The EC2 User Data Script runs with the root user
HANDS-ON :
LAUNCHING AN EC2
INSTANCE RUNNING LINUX
We’ll be launching our first virtual server using the AWS Console.
We’ll get a first high-level approach to the various parameters.
We’ll see that our web server is launched using EC2 user data
We’ll learn how to start/ stop/ terminate our instance.
EC2 INSTANCE TYPES
- OVERVIEW You can use different types of EC2 instances that are optimized for
different use cases.
AWS has the following naming convention ;
m5.2xlarge
m : instance class
5 : generation (AWS improves them over time)
2xlarge : size within the instance class
EC2 INSTANCE TYPES
– GENERAL PURPOSE Great for adversity of workloads such as web servers or code
repositories
Balance between :
Compute
Memory
Networking
In the course, we will be using t2.micro which is a General
Purpose EC2 instance.
Great for compute-intensive tasks that require high performance
EC2 INSTANCE processors :
TYPES – COMPUTE
Batch processing workloads
OPTIMIZED
Media transcoding
High performance web servers
High performance computing (HPC)
Science modelling & machine learning
Dedicated gaming servers
Fast performance for workloads that process large data sets in
memory
EC2 INSTANCE
TYPES – MEMORY Use cases :
OPTIMIZED
High performance relational/non-relational databases
Distributed web scale cache stores
In-memory databases optimized for BI (Business
Intelligence)
Applications performing real-time processing of big
unstructured data
Great for storage-intensive tasks that require high, sequential
EC2 INSTANCE read and write access to large data sets on local storage.
TYPES – STORAGE Use cases :
OPTIMIZED
High frequency online transaction processing (OLTP) systems
Relational & NoSQL databases
Cache for in-memory databases (for example Redis)
Data warehousing applications
Distributed file systems
EC2 INSTANCE TYPES : EXAMPLE
t2.micro is part of the AWS free tier (up to 750 hours per month)
Security Groups are the fundamental of network security in AWS
They control how traffic is allowed into or out of our EC2
INTRODUCTION TO Instances
SECURITY GROUPS
Inbound traffic
WWW
Security
Group
Outbound traffic EC2 Instance
Access to Ports
Authorized IP ranges – IPV4 and IPV6
Security
Group
Control of inbound network (from other to instance)
Control of outbound network (from the instance to other)
SECURITY GROUPS DIAGRAM
EC2 Instance
IP XX.XX.XX.XX
Security
Group
group issue
If your application gives a connection refused error, then it’s an
application error or it’s not launched
All inbound traffic is blocked by default
All outbound traffic is authorized by default
REFERENCING OTHER SECURITY GROUPS DIAGRAM
Security
Port
Port22123 Group 2 EC2 Instance
(attached) IP XX.XX.XX.XX
Port 22
CLASSIC PORTS TO 21 = FTP (File Transfer Protocol) – upload files into a file share
KNOW 22 = SFTP (Secure File Transfer Protocol) – upload files using
SSH
80 = HTTP – access unsecured websites
Security
Group
443 = HTTPS – access secured websites
3389 = RDP (Remote Desktop Protocol) – log into a Windows
instance
SSH SUMMARY TABLE
EC2 Instance
SSH Putty
Connect
Mac
Linux
Windows < 10
Windows >= 10
We’ll learn how to SSH into your EC2 instance using Windows
SSH is one of the most important function. It allows you to
HOW TO SSH INTO
YOUR EC2 INSTANCE control a remote machine, all using the command line.
FOR WINDOWS
SSH – Port 22
EC2 Instance
Security
Group
Linux
Public IP
Security
Group
Works only out-of-the-box with Amazon Linux2
Need to make sure the port 22 is still opened
On-Demand Instances – short workload, predictable pricing, pay by
second
Reserved (1 & 3 years)
EC2 INSTANCES Reserved Instances – long workloads
PURCHASING OPTIONS
Convertible Reserved Instances – long workloads with
flexible instances
Savings Plans (1&3 years) – commitment to an amount of usage, long
Security
Group
workload
Spot Instances – short workloads, cheap, can lose instances (less
reliable)
Dedicated Hosts – book an entire physical server, control instance
placement
Dedicated Instances – no other customers will share your hardware
Capacity Reservations – reserve capacity in a specific AZ for any
duration
Pay for what you use :
EC2 ON DEMAND Linux or Windows – billing per second, after the first
minute
All other operating systems – billing per hour
Security
Group
Has the highest cost but no upfront payment
No long-term commitment
Recommended for short-term and un-interrupted workloads,
where you can’t predict how the application will behave
Up to 72% discount compared to On-demand
You reserve a specific instance attributes (Instance Type, Region,
Tenancy, OS)
EC2 RESERVED Reservation Period – 1 year (+discount) or 3 years (+++discount)
INSTANCES Payment Options – No Upfront (+), Partial Upfront (++), All
Upfront (+++)
Reserved Instance’s Scope – Regional or Zonal (reserve capacity in
Security
Group
an AZ)
Recommended for steady-state usage applications (think database)
You can buy and sell in the Reserved Instance Marketplace
Convertible Reserved Instances :
Security
Group
Locked to a specific instance family & AWS region (e.g., M5 in us-
ease-1)
Flexible across :
Security
Group
Batch jobs :
Data Analysis
Image Processing
Any distributed workloads
Workloads with a flexible start and end time
Not suitable for critical jobs or databases
A physical server with EC2 instance capacity fully dedicated to
your use
Allows you address compliance requirements and use your
EC2 DEDICATED existing server-bound software licenses (per-socket, per-core, per-
HOSTS VM software licenses)
Purchasing Options :
Security
Group
Reserved – 1 or 3 years (No Upfront, Partial Upfront, All
Upfront)
The most expensive option :
Useful for software that have complicated licensing model
(BYOL – Bring Your Own License)
Or for companies that have strong regulatory or
compliance needs
EC2 DEDICATED INSTANCES
Instances run on hardware that’s
dedicated to you
Security
Combine with Regional Reserved Instances and Savings Plans to
Group
benefit from billing discounts
You’re charged at On-Demand rate whether you run instances or
not
Suitable for short-term, uninterrupted workloads that needs to be
in a specific AZ
On demand : coming and staying in resort whenever we like, we
pay the full price
WHICH PURCHASING
OPTION IS RIGHT FOR Reserved : like planning ahead and if we plan to stay for a long
ME? time, we may get a good discount
Savings Plans : pay a certain amount per hour for certain period
and stay in any room type (e.g.,King, Suite, Sea View,..)
Security
Group
Spot Instances : the hotel allows people to bid for the empty
rooms and the highest bidder keeps the rooms. You can get kicked
out at any time
Dedicated Hosts : We book an entire building of the resort
Capacity Reservations : you book a room for a period with full
price even you don’t stay in it
PRICE COMPARISION EX:- M4.LARGE – US-EAST-1
Price Type Price (per hour)
On-Demand $0.10
Spot Instance (Spot Price) $0.038 - $0.039 (up to 61% off)
Reserved Instance (1 year) $0.062 (No Upfront) - $0.058 (All Upfront)
Reserved Instance (3 years) $0.043 (No Upfront) - $0.037 (All Upfront)
EC2 Savings Plan (1 year) $0.062 (No Upfront) - $0.058 (All Upfront)
Reserved Convertible Instance (1 year) $0.071 (No Upfront) - $0.066 (All Upfront)
Dedicated Host On-Demand Price
Dedicated Host Reservation Up to 70% off
Capacity Reservations On-Demand Price
SHARED RESPONSIBILITY MODEL FOR EC2
Security
Group
SSH : start a terminal into our EC2 Instances (port 22)
EC2 Instance Role : link to IAM roles
Purchasing Options : On-Demand, Spot, Reserved (Standard +
Convertible + Scheduled), Dedicated Host, Dedicated Instance
QUIZ
1. WHICH EC2 PURCHASING OPTION CAN PROVIDE THE BIGGEST
DISCOUNT, BUT IS NOT SUITABLE FOR CRITICAL JOBS OR
DATABASES?
A. Scheduled Instances
B. Convertible Instances
C. Dedicated Hosts
D. Spot Instances
2. WHICH NETWORK SECURITY TOOL CAN YOU USE TO CONTROL
TRAFFIC IN AND OUT OF EC2 INSTANCES?
C. Guard Duty
D. Security Groups
3. UNDER THE SHARED RESPONSIBILITY MODEL, WHO IS
RESPONSIBLE FOR OPERATING-SYSTEM PATCHES AND UPDATES
ON EC2 INSTANCES?
A. The customer
B. AWS
A. 1 or 3 years
B. 2 or 4 years
C. 6 months or 1 year
A. Compute Optimized
B. Storage Optimized
C. Memory Optimized
D. General Purpose
6. WHICH OF THE FOLLOWING IS NOT AN
EC2 INSTANCE PURCHASING OPTION?
A. Spot Instances
B. Reserved Instances
C. On-demand Instances
D. Connect Instances
7. WHICH EC2 PURCHASING OPTION SHOULD YOU USE FOR AN
APPLICATION YOU PLAN ON RUNNING ON A SERVER
CONTINUOUSLY FOR 1 YEAR?
A. Reserved Instances
B. Spot Instances
C. On-demand Instances
D. Convertible Instances
ANSWERS
1–C
2–D
3–A
4–A
5–A
6–D
7–A