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
What is recommended for Spot Instances?
for Batch jobs, data analysis, image processing, not for critical jobs
26
What is the period that a Dedicated Hosts is allocated for your account?
Allocated for your account for 3 years.
27
Mention 2 things that Dedicated Hosts allow you to do
- Full control of instance placement. | - Visibility into the underlying sockets, physical cores of the hardware
28
What is specially useful for Dedicated Hosts?
For software that have complicated licensing model (BYOL - Bring Your Own License) or for companies that have strong regulatory or compliance needs
29
What is a Dedicated Instance?
Instances running on hardware that's dedicated to your account
30
Which are the 7 main EC2 instance types?
``` 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
What is a burstable instance (T2/T3)
if machine needs to process something unexpected (a spike in load for example), it can burst, and CPU can be VERY good.
32
What are burst credits?
It is what burstable instances uses when bursting and it is accumulated. If all credits are gone the CPU becomes BAD
33
What to do if you are always running low on burst credit?
you need to move to a different kind of non-burstable instance
34
What is a burstable instance (T2/T3 UNLIMITED)
It is a burstable instance but you don't lose the burst by paying extra money if you go over your burst credit
35
What is an AMI?
Amazon Machine Image is used to create out instances from it and can be built on Linux or Windows machines
36
Are AMIs region-scoped?
Yes
37
What are the advantages of AMIs?
- Faster boot time. - Pre-installed packages. - Active Directory integration out of the box. - Using someone else's optimised AMIs for different purposes
38
Where can I find an AMI?
On the Amazon Marketplace
39
Would you need to pay for other people's AMI?
Yes, by the hour
40
Where are AMIs placed?
in S3, but they are not visible on the console
41
How are AMIs by default? private or public?
private, locked for account / region
42
What is an ENI?
Elastic Network Interface is a logical component that represents a virtual network card
43
Name the attributes of an ENI:
* 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
Can you re use an ENI?
You can create ENI independently and attach them on the fly (move them) on EC2 instances for failover
45
Are ENIs multi AZ?
They are bound to a specific AZ
46
How are you billed in EC2?
by the second, with a minimum of 60 seconds
47
When you do not pay for the instance?
if it is stopped
48
EC2 instances prices (per hour) varies based on:
* Region * Instance Type * Instance Launch Type * Linux vs Windows vs Private OS (RHEL, SLES, Windows SQL
49
Suppose t2.small in US-EAST-1 (VIRGINIA), cost $0.023 per Hour. If used for 6 seconds, how much is it?
6 seconds, it costs $0.023/60 = $0.000383 (minimum of 60 seconds)
50
Suppose t2.small in US-EAST-1 (VIRGINIA), cost $0.023 per Hour. If used for 60 seconds, how much is it?
60 seconds, it costs $0.023/60 = $0.000383 (minimum of 60 seconds)
51
Suppose t2.small in US-EAST-1 (VIRGINIA), cost $0.023 per Hour. If used for 30 minutes, how much is it?
30 minutes, it costs $0.023/2 = $0.0115