EC2 - Elastic Compute Cloud Flashcards

1
Q

What OS you can not use to SSH into your instance?

A
  • Windows < 10, you can use any other OS including - - - Windows >= 10
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In what OS can you use Putty?

A

any Windows version

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

In what OS you can use Instance Connect?

A

All, don’t get confused with AMI

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

What is Instance Connect used for?

A

Connecting to your instance within your browser

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

Do you need your key file for Instance Connect?

A

No, your key file is only needed for SSH and/or Putty

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

Does Instance Connect need port 22 open?

A

Yes, same as SSH and/or Putty

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

Does Instance Connect work with any AMI?

A

Works only out-of-the-box with Amazon Linux 2

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

What can you use to bootstrap your instance?

A

EC2 User Data script

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

How many times does EC2 User Data run?

A

only once at the first start

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

What is used #!/bin/bash for?

A

It is the beginning of EC2 user data script

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

Which are the Instance Launch Types?

A
  • On Demand Instances
  • Reserved Instances (Regular, Convertible, Scheduled)
  • Spot Instances
  • Dedicated Instances
  • Dedicated Hosts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the commitment term of On demand Instances

A

no long term

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

What is the commitment term of Reserved Instances

A

long term, 1 to 3 years.

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

What is the cost of Convertible Reserved Instances compared to On Demand Instances and Regular Reserved Instances?

A

Cheaper than On-Demand but more expensive than Regular Reserved

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

What is a Convertible Reserved Instance?

A

A reserved instance that you can change its instance type

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

What is a Scheduled Reserved Instance?

A

A reserved instance that you can launch within time window you reserve

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

What is the cost of Spot Instances compared to the other Instance Launch types?

A

the most cost-efficient

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

What is a Spot Instance?

A

An instance that you can “lose” at any point of time if

your max price is < current spot price

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

What is a Dedicated Host?

A

It is a physical dedicated EC2 server for your use

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

What is the cost of Dedicated Hosts?

A

The most expensive

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

What is the cost of On demand instances

A

the highest ignoring Dedicated Hosts but no upfront payment, pay for what you use

22
Q

What is recommended for On demand instances

A

for short, predictable workloads

23
Q

What is the cost of Reserved Instances compared to On Demand Instances?

A

< On-demand and you pay upfront for what you use

24
Q

What is recommended for Reserved Instances?

A

long workloads, databases

25
Q

What is recommended for Spot Instances?

A

for Batch jobs, data analysis, image processing, not for critical jobs

26
Q

What is the period that a Dedicated Hosts is allocated for your account?

A

Allocated for your account for 3 years.

27
Q

Mention 2 things that Dedicated Hosts allow you to do

A
  • Full control of instance placement.

- Visibility into the underlying sockets, physical cores of the hardware

28
Q

What is specially useful for Dedicated Hosts?

A

For software that have complicated licensing model (BYOL - Bring Your Own License) or for companies that have strong regulatory or compliance needs

29
Q

What is a Dedicated Instance?

A

Instances running on hardware that’s dedicated to your account

30
Q

Which are the 7 main EC2 instance types?

A
R (RAM) - in memory caches
C (CPU) - compute / db
M (Medium) - general / web app
I (I/O) - good local I/O
G (GPU) - video rendering / machine learning
T2/T3 (Burstable Instances)
T2/T3 unlimited
31
Q

What is a burstable instance (T2/T3)

A

if machine needs to process something unexpected (a spike in load for example), it can burst, and CPU can be VERY good.

32
Q

What are burst credits?

A

It is what burstable instances uses when bursting and it is accumulated. If all credits are gone the CPU becomes BAD

33
Q

What to do if you are always running low on burst credit?

A

you need to move to a different kind of non-burstable instance

34
Q

What is a burstable instance (T2/T3 UNLIMITED)

A

It is a burstable instance but you don’t lose the burst by paying extra money if you go over your burst credit

35
Q

What is an AMI?

A

Amazon Machine Image is used to create out instances from it and can be built on Linux or Windows machines

36
Q

Are AMIs region-scoped?

A

Yes

37
Q

What are the advantages of AMIs?

A
  • Faster boot time.
  • Pre-installed packages.
  • Active Directory integration out of the box.
  • Using someone else’s optimised AMIs for different purposes
38
Q

Where can I find an AMI?

A

On the Amazon Marketplace

39
Q

Would you need to pay for other people’s AMI?

A

Yes, by the hour

40
Q

Where are AMIs placed?

A

in S3, but they are not visible on the console

41
Q

How are AMIs by default? private or public?

A

private, locked for account / region

42
Q

What is an ENI?

A

Elastic Network Interface is a logical component that represents a virtual network card

43
Q

Name the attributes of an ENI:

A
  • 1 primary private IPv4, one or more secondary IPv4
  • One Elastic IP (IPv4) per private IPv4
  • One Public IPv4
  • One or more security groups
  • A MAC address
44
Q

Can you re use an ENI?

A

You can create ENI independently and attach them on the fly (move them) on EC2 instances for failover

45
Q

Are ENIs multi AZ?

A

They are bound to a specific AZ

46
Q

How are you billed in EC2?

A

by the second, with a minimum of 60 seconds

47
Q

When you do not pay for the instance?

A

if it is stopped

48
Q

EC2 instances prices (per hour) varies based on:

A
  • Region
  • Instance Type
  • Instance Launch Type
  • Linux vs Windows vs Private OS (RHEL, SLES, Windows SQL
49
Q

Suppose t2.small in US-EAST-1 (VIRGINIA), cost $0.023 per Hour.
If used for 6 seconds, how much is it?

A

6 seconds, it costs $0.023/60 = $0.000383 (minimum of 60 seconds)

50
Q

Suppose t2.small in US-EAST-1 (VIRGINIA), cost $0.023 per Hour.
If used for 60 seconds, how much is it?

A

60 seconds, it costs $0.023/60 = $0.000383 (minimum of 60 seconds)

51
Q

Suppose t2.small in US-EAST-1 (VIRGINIA), cost $0.023 per Hour.
If used for 30 minutes, how much is it?

A

30 minutes, it costs $0.023/2 = $0.0115