EC2 Flashcards

1
Q

EC2

A

Web service that provides resizable compute capacity in the cloud

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

EC2 Pricing Models

A

Dedicated, On Demand, Reserved and Spot

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

Dedicated Hosts

A

Physical EC2 Server; server-bound software licenses

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

On Demand

A

Pay fixed rate by the hour w/no commitment

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

Spot

A

Bidding; flexible start and end times

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

Reserved

A

Capacity reservation; 1/3 yr contracts

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

Reserved Pricing Types

A

Standard, Convertible and Scheduled

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

Spot instance termination

A

if terminated by AWS, you will not be charged for a partial hour of usage; if you terminate the instance, you will be charged

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

Termination Protection

A

Turned off by default, you must turn it on

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

What happens to the EBS root volume when instance gets terminated?

A

Default: Root EBS volume is deleted

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

What happens to other non root volumes when instances gets terminated?

A

remains, it has to be deleted manually

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

Can the EBS Root Volume of your default AMI be encrypted?

A

No but there are ways to do it

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

Can additional volumes be encrypted?

A

Yes

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

Inbound traffic default behavior

A

blocked

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

Outbound traffic default

A

allowed

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

When do changes for security groups take effect

A

immediately

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

Security group relation to EC2 instances

A

M:M

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

Security Group is STATEFUL

A

If you create an inbound rule, an outbound rule is created automatically (HTTP in, HTTP out). You don’t have to create it explicitly as part of the Security group Outbound rule.

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

Network Access Control Lists (NACL) are STATELESS

A

If you create an inbound rule, you have to create the outbound rule explicitly; it will not be created automatically

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

Blocking IP Addresses in Security Groups

A

cannot be done; it has to be done via the NACL

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

Specifying rules in Security Groups

A

only allow rules, not deny rules

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

EBS

A

Elastic Block Store - provides persistent block storage volumes for use with Amazon EC2 instances in the Cloud

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

Types of EBS Storage

A

GP (SSD), PI (SSD), Througput Optimised HDD, Cold HDD and Magnetic

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

GP SSD (Desc, Use Case, API Name, Volume Size, Max IOPS/Volume)

A

General purpose SSD, most work loads,gp2, 1 GiB- 16 TiB, 16,000

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

PI SSD (Desc, Use Case, API Name, Volume Size, Max IOPS/Volume)

A

High performance, Databases, io1, 4 GiB - 16 TiB, 64,000

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

Throughput Optimized HDD (Desc, Use Case, API Name, Volume Size, Max IOPS/Volume)

A

Low cost HDD for frequently accessed, throughput intensive workloads, Big Data& Data Warehouses, st1, 500GiB - 16 TiB, 500

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

Cold HDD (Desc, Use Case, API Name, Volume Size, Max IOPS/Volume)

A

Lowest cost HDD for less frequently accessed workloads, File Servers, sc1, 500 GiB - 16 TiB, 250

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

EBS Magnetic (Desc, Use Case, API Name, Volume Size, Max IOPS/Volume)

A

Prev gen HDD, Workloads where data is infrequently accessed, Standard, 1GiB - 1 TiB, 40-200

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

EC2 instance and EBS Volume AZ

A

They have to be in the same AZ to avoid lag

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

Volumes exist on

A

EBS (virtual hard disk)

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

Snapshots

A

exist on S3; photographs of the disk - point in time copies of Volumes

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

Snapshots are incremental

A

only the blocks that have changed since your last snapshots are moved to S3 (deltas)

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

Creating first snapshot

A

will take time to create

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

AMIs can be created from

A

Volumes and snapshots

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

Changing EBS volume sizes on the fly can be done for

A

can be done for size and storage

36
Q

How to move an Ec2 volume from one AZ to another

A
  1. Take a snapshot of it
  2. Create an AMI from the snapshot
  3. Use AMI to launch the Ec2 instance in the new AZ
37
Q

How to move an Ec2 volume from one region to another

A
  1. Take a snapshot of it
  2. Create an AMI from the snapshot
  3. Copy the AMI from one region to the other
  4. Use the copied AMI to launch the new Ec2 instance in the new Region
38
Q

Snapshots of encrypted volumes are

A

encrypted aumotatically

39
Q

Volumes restored from encrypted snapshots are

A

encrypted aumotatically

40
Q

When can you share snapshots

A

only if they are unecrypted

41
Q

How can you share snapshots

A

other AWS accounts or made public

42
Q

AMI can be selected based on

A
  1. Region
  2. OS
  3. Architecture (32/64)
  4. Launch Permissions
  5. Storage for Root Device
43
Q

2 types of storage for root device

A
  1. EBS - launched from the AMI that is an amazon EBS volume created from an Amazon EBS snapshot
  2. Instance Store - launched from the AMI that is an instance store volume created from a template stored in Amazon S3
44
Q

Instance store volumes are sometimes called

A

Ephemeral Storage

45
Q

Diff between instance store volume and EBS backed instance

A
  1. Instance store volumes cannot be stopped, if the underlying host fails, you will lose your data. EBS can be stopped and you will not lose data when stopped.
  2. By default, both root volumes will be deleted on termination but with EBS, you can tell AWS to keep the root device volume
46
Q

Similarity between EBS and instance store

A

You can reboot both, you will not lose your data

47
Q

Root device encryption by default

A

uencrypted

48
Q

If a snapshot is encrypted, can you unencrypt it?

A

NO

49
Q

Steps to encrypt the root device volume

A
  1. Create a snapshot of the unencrypted root device volume.
  2. Create a copy of the Snapshot and select the encrypt option.
  3. Create an AMI from the encrypted snapshot
  4. Use that AMI to launch new encrypted instances
50
Q

Amazon Cloudwatch

A

is a monitoring service to monitor your AWS resources, as well as the applications that you run on AWS

51
Q

CloudWatch can monitor

A
  1. Compute - EC2 instances, Autoscaling Groups, Elastic Load Balancers, Route 53 Health Checks
  2. Storage & Content Delivery - EBS Volumes, Storage Gateways, CloudFront
52
Q

Host level metrics consists of

A
  1. CPU
  2. Network
  3. Disk
  4. Status Check
53
Q

AWS CloudTrail

A

increases visibility into your user and resource activity by recording AWS Management Console Actions and API calls.

54
Q

Difference between CloudWatch and CloudTrail

A

> Cloudwatch monitors performance (gym trainor) while cloudtrail monitors API calls in the AWS Platform (CCTV)
Cloudwatch = Performance; CloudTrail = Auditing

55
Q

CloudWatch with EC2 will monitor events every

A

5 mins by default (detailed monitoring can be turned on - 1 min intervals)

56
Q

Who is provisioning what resource in AWS such as S3 or EC2 – CloudTrail or CloudWatch?

A

CloudTrail

57
Q

Figuring out what the network throughput is or disk IO on your EC2 instance – CloudTrail or CloudWatch

A

CloudWatch

58
Q

What can you do with Cloudwatch?

A
  1. Dashboards
  2. Alarms
  3. Events
  4. Logs
59
Q

CLI

A

AWS Command Line Interface

60
Q

How can you use CLI to access your Ec2 instances

A

setup access in IAM

61
Q

Roles versus access key

A
  1. Roles are more secure
  2. Roles are easier to manage
  3. Roles can be assigned to an Ec2 instance after it is created using both the console & command line.
  4. Roles are universal - you can use them in any region.
62
Q

Bootstrap scripts

A

> run when an Ec2 instance first boots

> powerful way of automating software installs and updates

63
Q

Instance meta data

A

curl http://169.254.169.254/meta-data/

64
Q

Instance user data

A

curl http://169.254.169.254/user-data/

65
Q

Amazon EFS

A

a file storage service for Amazon Elastic Compute Cloud (EC2) instances

66
Q

Can an EBS volume be shared by 2 EC2 instances?

A

No

67
Q

Can EFS volume be shared by 2 EC2 instances?

A

Yes

68
Q

EFS supports

A

NFSv4 protocol

69
Q

EFS storage

A

pay for the storage you use (no pre-provisioning required)

70
Q

EFS scale

A

petabytes

71
Q

EFS can support # of concurrent NFS connections

A

thousands

72
Q

Data in EFS is stored across multiple AZs within a region - true or false

A

true

73
Q

EFS Consistency

A

Read after Write Consistency

74
Q

2 types of placement group

A
  1. Clustered

2. Spread

75
Q

Cluster placement group

A

grouping of instances within a single AZ

76
Q

Cluster placement group are recommended for

A

applications that need low network latency, high network throughput or both

77
Q

Spread placement group

A

group of instances that are each placed on distinct underlying hardware

78
Q

Spread placement group are recommended for

A

applications that have a small number of critical instances that should be kept separate from each other

79
Q

Diff between spread and clustered

A

Clustered can’t span multiple AZs but spread can

80
Q

Naming of placement group

A

must be unique within your AWS account

81
Q

Types of instances that can be launched in a placement group

A

Compute Optimized, GPU, Memory Optimized, Storage Optimized

82
Q

AWS recommends what to be placed in placement groups

A

homogenous instances

83
Q

Can you merge placement groups

A

no

84
Q

can you move an existing instance into a placement group

A

no

85
Q

How to move an existing instance into a placement group

A
  1. Create an AMI from your existing instance

2. Launch a new instance from the AMI into a placement group