5. EC2 Flashcards

1
Q

List the EC2 Instance Launch Types.

A
  1. On-Demand
  2. Reserved (reserved, convertible reserved)
  3. Spot Instances
  4. Dedicated Instances
  5. Dedicated Hosts
    new:
  6. Savings Plans
  7. Capacity Reservations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are On-Demand instances?

A
  • Best for short-term and uninterrupted workloads

- Highest cost launch type

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

What are Reserved instances?

A
  • 1 or 3 years only
  • recommended for steady-state usage applications with long workloads (think database)
  • you reserve specific instance attributes (instance type, region, tenancy, OS)

- best for steady state applications (databases)

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

What are Convertible Reserved instances?

A
  • 1 or 3 years only
  • recommended for long workloads
  • can change the EC2 instance type

- best for long workloads with flexible instances

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

What are Spot instances?

A
  • best for workloads that are resilient to failure (batch jobs, data analysis, image processing, etc)
  • not great for critical jobs or databases
  • CHEAP
  • can lose instances (less reliable)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are Dedicated instances?

A
  • instances run on hardware that’s dedicated to you
  • may share hardware with other instances in same account
  • no control over instance placement (can move hardware after Stop/Start)

- no instance placement control

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

What are Dedicated Hosts?

A
  • book an entire physical server
  • control instance placement
  • most expensive option
  • useful for software with complicated licensing models and/or companies with strong regulatory or compliance needs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is EBS?

A

Elastic Block Storage

  • a network drive you can attach to your instances while they run, allowing your instances to persist data
  • Can be attached to only one instance at a time
  • Are locked at the Availability Zone (AZ) level
  • To migrate an EBS volume across AZ: Take a snapshot and restore the snapshot to another AZ
  • Root EFS volumes of instances get terminated by default if the EC2 instance gets terminated (you can disable that)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is EFS?

A

Elastic File Storage

  • Mounting 100s of instances across AZ
  • EFS share website files (WordPress)
  • Only for linux instances (NOT Windows)
  • EFS has a higher price point than EBS
  • Highly available, scalable, expensive (3x gp2), pay per use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is an EC2 Instance Store?

A
  • Physical disk attached to the physical server where your EC2 is
  • Very high IOPS (because physical)
  • Block storage (just like EBS)
  • Cannot be increased in size
  • Risk of data loss if hardware fails
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is EC2 User Data?

A

EC2 User Data is used to automate boot tasks such as:

  • installing updates
  • installing software
  • downloading common files from the internet

The EC2 User Data Script runs with the root user
- script only runs once at instance first start

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

What is an AMI?

A

Amazon Machine Image

  • image used to create instances
  • AWS comes with base images (Ubuntu, Windows, etc)
  • images can be customized at runtime using EC2 User Data
  • AMIs are built for a specific AWS region
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an ENI?

A

Elastic Network Interface

  • logical component in a VPC that represents a virtual network card
  • bound to a specific AZ
  • you can create ENI independently and attach them on the fly (move them)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Security groups contain what kind of rules?

A

Security groups only contain ALLOW rules

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

If your application throws a timeout error, what is the issue?

A

Security Group Issue

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

If you application gives a “connection refused” error, what is the issue?

A

Application error - check that it’s launched

17
Q

What port is used for RDP (Remote Desktop Protocol)?

A

3389

18
Q

What port is used for HTTP?

A

80

19
Q

What port is used for HTTPS?

A

443

20
Q

What port is used for SSH?

A

22

21
Q

What port is used for FTP?

A

21

22
Q

What port is used for SFTP?

A

22 (files are uploaded via SSH)