1
Q

What does EC2 stands for?

A

Elastic Computer Cloud

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

What are EC2โ€™s four main capabilities?

A

Renting virtual machines (EC2)
Storing data on virtual drives (EBS)
Distributing load accross machines (ELB)
Scaling the services using an auto-scaling group (ASG)

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

What does EBS stands for?

A

Elastic Block Store

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

What does ELB stands for?

A

Elastic Load Balancing

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

What does ASG stands for?

A

Auto-Scaling Group

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

How do I SSH into an EC2 instance?

A

ssh -i keypair.pem ec2-user@XXX.XXX.XXX.XXX

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

What is the standard TCP port for SSH?

A

22

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

MAC: What to do if I get โ€œWARNING: UNPROTECTED PRIVATE KEY FILE!โ€ while trying to connect to my EC2 instance via SSH?

A

Run the command โ€œchmod 0400 keypair.pemโ€

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

WINDOWS: What to do if I get โ€œWARNING: UNPROTECTED PRIVATE KEY FILE!โ€ while trying to connect to my EC2 instance via SSH?

A

Look at the properties of the .pem file and make sure that Iโ€™m the sole Owner of the file

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

What is a key pair?

A

A key pair is โ€œkeypair.pemโ€ looking file which allows me to connect to my EC2 instance via SSH

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

What are the fundamentals of network security in AWS?

A

Security Groups

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

What is the function of Security Groups?

A

To control how traffic is allowed into or out of our EC2 machines

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

What do security groups regulate?

A

Allowed ports

Authorized IP ranges - IPv4 and IPv6

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

Can a security group be attached to many instances at the same time?

A

Yes

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

Are security groups global?

A

No, they are locked down to a region / VPC

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

What does VPC stands for?

A

Virtual Private Cloud

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

Where do security groups lives (in relation to EC2 instances)?

A

They live outside of EC2 instances. These instances arenโ€™t aware of blocked traffic.

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

What common problem occurs when security groups are badly configured?

A

Application is not accessible (Timeout)

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

What does a โ€œconnection refusedโ€ error mean when it comes to security groups?

A

They are unrelated, โ€œconnection refusedโ€ errors come from the EC2 itself or an application running on it. If a security group blocks your request, you wonโ€™t see anything other than a timeout after a while.

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

By default, security groups ____ all inbound traffic and ____ all outbound traffic.

A

block all inbound traffic

allow all outbound traffic

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

Characteristics of Public IP

A

Public IP can be identified on the internet (WWW)
Must be unique across the whole web
Can be geo-located easily

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

Characteristics of Private IP

A

Can only be identified on a private network only
Must be unique across the private network
E.g. Two different private networks can have the same IPs
Machines connect to WWW using an internet gateway (a proxy)
Only a specified range of IPs can be used as private IP

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

Characteristics of Elastic IP?

A

When you stop and then start an EC2 instance, it can change its public IP.
If you need to have a fixed public IP for your instance, you need an Elastic IP
An Elastic IP is a public IPv4 IP you own as long as you donโ€™t delete it
You can attach it to one instance at a time

24
Q

What happens to the public IP of an EC2 instance if the machine is stopped and then started?

A

The public IP can change

25
Q

What is an EC2 User Data script?

A

A script that gets run when the EC2 instance first starts (It wonโ€™t get executed on future stop/start)

26
Q

What tasks can an EC2 User Data script do?

A
Anything, for e.g.
Install updates
Install software
Download common files from the internet
etc.
27
Q

As which user does the EC2 user data script run?

A

root

28
Q

What are the EC2 Instance Launch Types?

A

On-Demand Instances

Reserved Instances

  • Convertible Reserved Instances
  • Scheduled Reserved Instances

Spot Instances

Dedicated Instances
Dedicated Hosts

29
Q

On-Demand Instances pricing

A

Pay for what you use

Highest cost but no upfront payment and no long term commitment

30
Q

On-Demand Instances recommended use case

A

Short term un-interrupted workloads where you canโ€™t predict how the application will behave

31
Q

Reserved Instances pricing

A

75% discount compared to On-demand

Pay upfront for what you use

32
Q

Reserved Instances reservation period

A

1 or 3 years

33
Q

Reserved Instances recommended use case

A

Steady state usage applications (think database)

34
Q

Convertible Reserved Instance pricing

A

Up to 54% discount compared to On-demand

35
Q

Convertible Reserved Instance main characteristic

A

Can change the EC2 type

36
Q

Scheduled Reserved Instances main characteristic

A

Launch within the time window you reserve (when you require a fraction of day/week/month)

37
Q

Spot Instances pricing

A

Up to 90% discount compared to On-demand

Price varies based on offer and demand

38
Q

Spot Instances usage time

A

You bid a price and get the instance as long as its under the price

39
Q

How are spot instances reclaimed by AWS?

A

Spot instances are reclaimed with a 2 minute notification warning when the spot price goes above your bid

40
Q

Spot Instances recommended use case

A

Batch jobs
Big Data analysis
Workloads that are resilient to failures

41
Q

Dedicated Hosts recommended use case

A

Software that have complicated licensing model (BYOL โ€“ Bring Your Own License)
Companies that have strong regulatory or compliance needs

42
Q

Dedicated Hosts characteristics

A

Physical dedicated EC2 server for your use
Full control of EC2 Instance placement
Visibility into the underlying sockets / physical cores of the hardware

43
Q

Dedicated Hosts pricing

A

More expensive than reserved instances

44
Q

Dedicated Hosts reservation period

A

1 to 3 years

45
Q

Dedicated Instances characteristics

A

Running on hardware thatโ€™s dedicated to you

May share hardware with other instances in same account

46
Q

On what time increments are EC2 instances usage billed?

A

On one second increments with a minimum of 60 seconds

47
Q

What factors influence an EC2 instance price?

A

Its type
Its region
Its pricing model (On-Demand, Savings Plan, Reserved, Spot, Dedicated Host)
Its OS

48
Q

What does AMI stands for?

A

Amazon Machine Image

49
Q

How to customize an existing AMI at runtime?

A

!/bin/bash

By using an EC2 User Data script like the following:

########################################################
##### USE THIS FILE IF YOU LAUNCHED AMAZON LINUX 2 #####
########################################################
# get admin privileges
sudo su
# install httpd (Linux 2 version)
yum update -y
yum install -y httpd.x86_64
systemctl start httpd.service
systemctl enable httpd.service
echo "Hello World from $(hostname -f)" > /var/www/html/index.html
50
Q

What is the scope of an AMI?

A

Its region, it cannot be used in another region

51
Q

What are some advantages of using a custom AMI?

A

Having pre-installed packages
Faster boot time
Machine can be configured with monitoring / enterprise software
Installing your app ahead of time (faster deploys when auto-scalling)
Optimization out of the box

52
Q

What are the 5 distinct characteristics of EC2 instances?

A
RAM
CPU
I/O (disk performance, EBS optimisations)
Network
GPU
53
Q

What are burstable instances (T2, T3, T3a)

A

Machines that can handle a hard spike in load very efficiently but wonโ€™t last if the load doesnโ€™t decrease

54
Q

What are burstable instances (T2, T3, T3a) good at?

A

Handling unexpected traffic and getting the insurance that it will be handled correctly

55
Q

When should you consider using scheduled reserved instances?

A

When you have workloads that require a fraction of day/week/month