EC2 Flashcards

1
Q

What is AMI?

A

An AMI (Amazon Machine Image) is a template that contains the software configuration (operating system, application server, and applications) required to launch an EC2 instance

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

Permissions required on the private key (pem file)

A

0400

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

Default policy for inbound traffic in a security groups

A

Deny all

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

Default policy for outbound traffic in a security group

A

Allow all

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

What is an Elastic IP?

A

a static public IPv4 IP designed for dynamic cloud computing.

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

are Elastic IPs region specific or global?

A

region specific

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

command used to start services in an Amazon Linux 2 machine

A

systemctl

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

Whats bootstrapping?

A

Launching commands when the machine starts

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

what user is used to run the bootstrap routine?

A

root

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

What is the EC2 User data?

A

Data used to perform common automated configuration tasks and even run scripts after the . EC2 instance starts

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

What types of used data can you pass to Amazon EC2?

A

shells scripts and cloud-init directives

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

When are the user data scripts run?

A

By default they are only run during the boot cycle when you first launch an EC2 instance

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

Where is the user data script copied to for execution?

A

it is copied to the directory /var/lib/cloud

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

Why should you delete the user data script from the EC2 instance?

A

If you were to create an AMI from the EC2 instance and the user data was not deleted, then the script would be executed for every EC2 instance created from the resulting AMI

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

You pay for an EC2 instance compute component only when it’s in “running” state or also when it is on “stopped” state?

A

Only when it is in “running” state

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

Security Groups can reference all of the following except:

  • IP address
  • CIDR block
  • Security Group
  • DNS name
A

DNS name

17
Q

What security groups are locked down to?

  • a region
  • a vpc
  • a region/vpc combination
A

a region/vpc combination

18
Q

What does EC2 stand for?

A

Elastic Compute Cloud

19
Q

EC2 Instance Purchasing Options

A
  • On-demand instances
  • Reserver Instances
  • Scheduled Instances
  • Spot instances
  • Dedicated Hosts
  • Dedicated Instances
  • Capacity Reservations
20
Q

What is an on-demand instance?

A

it is an EC2 instance purchasing option where you pay bay the second for the instances that you launch

21
Q

Whats is a Reserved Instance?

A

EC2 instance purchasing option where you pay for a term from one to three years

22
Q

What is a Scheduled Instance?

A

EC2 instance purchasing option where the instance are always available on the specified recurring schedule, for a one-year term

23
Q

What is a Spot instance?

A

EC2 instance purchasing option where you request unused EC2 instances

24
Q

Whats a dedicated host?

A

EC2 instance purchasing option where you pay for a physical host that is fully dedicated to run you EC2 instances

25
Q

What is a dedicated instance?

A

EC2 instance purchasing option where you pay by the hour, for instances that run in a single-tenant hardware

26
Q

What is Capacity Reservation?

A

EC2 instance purchasing option where you reserve capacity for your EC2 instances in a specific Availability Zone for any duration

27
Q

EC2 R instance type

A

Instances for applications that need a lot of RAM - in memory caches

28
Q

EC2 C instance type

A

Instances for applications that need good CPU - compute/databases

29
Q

EC2 M instance type

A

Instances for applications that are balanced - general/web app

30
Q

EC2 I instance type

A

Instances for applications that need a good local I/O (instance storage) - databases

31
Q

EC2 G instance type

A

Instances for applications that need GPU - video rendering/machine learning

32
Q

EC2 T2/T3 Instance type

A

Burstable instances

33
Q

EC2 T2/T3 - unlimited instances type

A

Unlimited burst

34
Q

Are custom AMI available region-wise or globally?

A

Region-wise

35
Q

What type of placement groups there exist for EC2 instances?

A

Cluster and Spread

36
Q

Cluster placement group

A
  • Have great network speed (10 Gb)
  • All EC2 instances in a Cluster are in the same Rack (same hardware/Availability Zone)

Use cases:

  • BigData job that needs to be completed fast
  • Applications that need extremely low latency and high network throughput
37
Q

Spread placement group

A
  • All EC2 instances are located in different hardware
  • Can span across multiply Availability Zones
  • Reduced risk of simultaneous failure
  • Limited to 7 instances per AZ per placement group

Use case:

  • Application that needs to maximize high availability
  • Cassandra Cluster, Kafka, Clustered Web Application that is distributed
38
Q

EC2 instances that can not be instantiated in a placement group

A

T2

39
Q

Difference between Cluster and Spread placement groups

A

Clusters

  • have great network speed (10 Gb)
  • All EC2 instances in a Cluster are in the same Rack (same hardware/Availability Zone)