EC2 Fundamentals Flashcards

1
Q

Elastic Compute Cloud Services

A
  • rent virtual machines (EC2)
  • store data on virtual drives (EBS)
  • distribute load across machines (ELB)
  • scale services using auto scaling group (ASG)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EC2 Configuration

A
  • OS, computer power & cores (CPU)
  • RAM
  • storage
    • EBS & EFS (network attached)
    • hardware (EC2 instance store)
  • Security Groups - firewall
    • regulate access to ports
    • authorized IP ranges
    • control of inbound AND outbound
    • can be attached to multiple instances
    • locked down to a specific region/vpc combination
    • only contain ‘allow’ rules
      • by default all inbound traffic is blocked
      • by default all outbound traffic is authorized
    • can reference by IP or security group
    • if you app hangs, then it’s a security group issue
    • if your app gives ‘connection refused’ then it’s an application error
  • bootstrap script - configure at first launch: ec2 user data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

EC2 User Data Script

A
  • can bootstrap our instances using an EC2 user data script
    • install updates, software, etc
  • only ran once at startup
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

EC2 Instance Types

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

When does EC2 public IP change?

A
  • public ip will change if you start/stop instance
  • private ip will not change
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Common EC2 ports

A
  • 22 - SSH
  • 21 - FTP
  • 22 SFTP (Secure file transfer protocol) uses ssh
  • 80 - HTTP
  • 443 - HTTPS
  • 3389 - RDP (remote desktop protocol) log into windows instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

EC2 reserved purchase option

A
  • long workloads
  • convertible reserved instances
    • can change the ec2 instance type, family, os
  • up to 72% discount compared to on-demand
  • reserve instance type, region, os
  • payment options
    • up front, partial upfront, all upfront
  • scope - regional or zonal
  • recommended for steady state usage apps (think database)
  • can buy and sell in the reserved instance marketplace
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Ec2 on demand purchase option

A

on-demand instances - short workload, predictable, pay by second

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

Ec2 saving plan purchase option

A
  • commit to certain types of usage (10%/hr for the next 1 or 3 years)
  • additional usage is at the ‘on-demand’ price
  • locked into a specific instance family and region (M5 in us-east-2)
  • flexible across instance size (m5.xlarge, m5.2xlarge) and os (linux,windows)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Ec2 spot instances purchase option

A
  • most cost-effective
  • good for batch jobs, distributed workloads, data analysis
  • not suitable for critical jobs and databases
  • short workloads, cheap, less reliable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Ec2 dedicated hosts purchase option

A
  • allows you to address compliance requirements and use existing server bound software licenses
  • can pay as ‘on demand’ or reserved (1 or 3 years)
  • most expensive
  • book an entire physical server and control instance placement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Ec2 dedicated instances purchase option

A
  • no other customers will share your hardware
  • no control over instance placement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

burstable performance instances

A

Burstable performance instances, which are T3, T3a, and T2 instances, are designed to provide a baseline level of CPU performance with the ability to burst to a higher level when required by your workload. Burstable performance instances are the only instance types that use credits for CPU usage.

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

EC2 Basic Monitoring

A

5 minute granularity (detailed is 1 min)
enabled by default using launch templates and through aws console when creating a launch configuration

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

EC2 detailed monitoring

A

1 min granularity
enabled by default when creating a launch configuration with the aws cli or sdk

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

when a spot instance is interrupted

A

You can specify that Amazon EC2 should do one of the following when it interrupts a Spot Instance:

Stop the Spot Instance

Hibernate the Spot Instance

Terminate the Spot Instance

The default is to terminate Spot Instances when they are interrupted.

17
Q

Regional vs Zonal reserved instances

A
18
Q

EC2 auto scaling

A

A volume is attached to a new instance when it is added. Amazon EC2 Auto Scaling doesn’t automatically add a volume when the existing one is approaching capacity. You can use the EC2 API to add a volume to an existing instance.

regional constructs. span AZs but not regions

You don’t have to use ELB to use Auto Scaling. You can use the EC2 health check to identify and replace unhealthy instances.