EC2 - Elastic Compute Cloud Flashcards

1
Q

What is EC2?

A

A web service that provides resizable compute capacity in the cloud. Reduces time to obtain and boot new servers, allowing you to scale capacity. Scale up/down

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

EC2 Pricing

A
  1. On Demand - Fixed rate by the hour. No commitment
  2. Reserve - Capacity reservation at a discount. 1-3 year contract
  3. Spot - Bid on whatever price you want for instance capacity.
  4. Dedicated Hosts - Physical Ec2 serve dedicated for you. Allows for you to use exsisting software. On demand.

On Demand

Good for flexablity. Short term application that can’t be interupted. Good for in devleopment apps

Reserved

Good for steady predictable usage. Can make upfront payments. More you pay/longer the contract the more you save

  • Standard reserve - Offers 75% off on demand instances
  • Convertable reserve - 54% off on demand. Able to change instance type
  • Scheduled reserve instances - Schedule instances to a time window (School example)

Spot

  • Good for flexable start/end time applications
  • Good for low compute
  • Good for additional capacity
  • If spot instance goes down on AWS’s end you wont’ be charged but if you terminate it yourself you will be charged
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Creating an EC2 Instance

A
  • Termination Protection is turned off by default
  • EBS-backed instance - the defualt action is for the root EBS zoplume to be deleted when the instance is terminated.
  • EBS Root volumes of your default AMI’s CAN be encrypted and any other volumes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

EC2 Security Groups

A

Any changes to security groups take effect immediatly

Are stateful - any inbound rules automattically make and outbound rule/outbound traffic allowed

All inbound traffic is blocked by default - you have to allow things

Outbound traffic is allowed

Can have any number of EC2 instances within a security group and visa versa

You can’t block specific IP Addresses

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

What is EBS (Elastic Block Store)?

A

Virtual hard disk drive in the Cloud

  • General Purpose (SSD) - Most work loads
  • Provisioned IOPS (SSD) - Databases
  • ThroughputnOptimised HDD - Big data
  • Cold HDD -File servers
  • Termination Protection is turned off by default
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

EBS (Elastic Block Store) Volumns and Snapshots

A
  • EBS Volumns will always be in the same area as your EC2 Instance
  • Snapshots are copies of EC2 instances - good for moving EC2 instances to new Avaliabilitly Zones(e-virginia-a1) as well as a different region(London) - exsist on S3
    • Best practise it to stop the root instance beforehand
    • Can create AMI (image)
  • Extra volumes created presist
  • You can change EBS volume sizes on the fly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

AMI Types

A

EBS Volume:

  • Can be stopped
  • data presists
  • can reboot
  • ROOT device (OS) === Amazon EBS Volume created with a snapshot

Instance Store volume (Ephemeral Storage = shit):

  • If hosat fails you’ll lose all your data
  • Cannot be stopped
  • ROOT device (OS) === made from a template stored in Amazon S3

Both

  • Root volumes will be deleted on termination, but with EBS you can tell AWS to keep it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Networking - ENI vs ENA vs EFA

A

ENI - Elastic Network Interface - virtual wifi(network) card - basic networking/low cost - multiple

EN - Enhanced Networking - single root to provide high-performance networking capabilities to support Instance types. - SR-IOV

Depending on network there are 2 different types

  • ENA - Elastic Network adapter support up to 100 Gbps
  • VF - 10Gbps - older instances

EFA - Elastic Fabric Adapter - network devices the you can attach to your EC2 instance to accelorate computing(HPC)/machine learning apps

  • lower more consistant latency and high throughput
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Encrypted ROOT Device Volumes

A

ROOT volumes are just the volumes that contain the OS - can encrypt during setup

Snapshots of volumes are encrypted automatically

Process to convert an unencrypted to an encrypted:

Snapshot -> Copy w/encrypt option -> create AMI(image) of that copy -> launch encrypted instance

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

Spot Instances & Spot Fleets

A

Spot Instances

  • Allow you to take advantage of unused EC2 capacity in AWS
  • Up to 90% discount
  • Can use Spot Block to keep from terminating
  • Good for flexible applications
    • Big data
    • CI/CD
    • Web Services
    • Media rendering
    • HPC(high performance computing)
  • Not good for:
    • Presistant workloads
    • critical jobs
    • databases

Spot Fleets

  • Collection of Spot Instances/On-demand Instances
    *
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EC2 Hibernate

A

Takes the RAM and saves it to your EBS volume

When rebooting, instance loads a lot faster - no need to boot OS again

Good for long-running processes and Services that take a long time to initialize.

Root volume MUST be encrypted

Can’t be hibernated for mor ethan 60 days

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

CloudWatch

A

Cloudwatch Performance monitoring service that watches your AWS resources and applications. Different from Cloudtrail which is a user monitoring service for AWS actions in the Management Console + APIs

Cloudwatch

  • Monitors every 1min(detailed) or 5mins
  • Can create alarms
  • Compute
    • EC2 Instances
    • Autoscaling
    • Elastic Load Blanacers
    • Route 53
  • Storage
    • EBS
    • Storage Gateways
    • Cloudfront

What metrics:

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

EFS

A

EFS - Elastic File System - FIle storage for EC2 - Storage capacity is elastic

  • Supports the Network File System V4 (NFSv4) protocol
  • Only pay for the storage you use
  • can scale up/down
  • can support concurrant NFS connections
  • Data can be stored across multiple AZ’s
  • Read after write consistancy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Storage - Windows FSx / Lustre

A

Windows FSx. VS EFS VS Lustre

Windows FSx.

  • SMB Based
  • Designed for Windows

EFS

  • Linux only
  • NFS Based

Lustre

  • Good for processing large data sets / high perfomance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

EC2 Placement Groups

A
  • Cluster
    • A groiuping of instances within a single AZ
    • Clusters are close together to combat low latency/high throughput
    • need same EC2 instance types
  • Spread
    • single EC2 instances that are placed on destinct underlaying hardware
    • 1 instance per rack with multiple racks
    • critical
    • multiple AZ
  • Partitioned
    • Similar to Spread but multiple EC2 instances within a rack but spread out accross multiple racks
    • think mutlple EC2 instances
    • multiple AZ
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

High Performance Compute (HPC)

A

Achieve on AWS through

  • Data Transfer
    • snowball, snowmobile
    • AWS datasync - S3, EFS
    • Direct Connect
  • Compute and Netowrking
    • EC2
    • fleets
    • placement groups
    • ENA
    • EFA
  • Storage
    • INSTANCE
      • EBS
      • Instance Store
    • NETWORK
      • S3
      • EFS
      • Lustre
  • Ochestration
    • Batch
    • Parallel Cluster
17
Q

Web Application Firewall (WAF)

A

Web application firewall that lets you monitor the HTTP/HTTPS requests that coming in from different services. Lets you control access to your content.

Allows 3 different types of behavior

  • Allow all requests except the ones you specify
  • Block all requests except the ones you specify
  • Count a requests that match properties you specify