EC2 Flashcards

1
Q

What is the difference between a dedicated instance and a dedicated host?

A

A dedicated host allows for placement control, visibility of sockets and cores. They are available for a 3 year period and are used for bring your own license, for software that does not support multi-tenanted licensing, or compliance.
A dedicated instance is a physical server with automatic instance placement only. It may share hardware with other instances in the account

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

When would you use a spot instance?

A

Batch jobs, big data workloads which are resilient to failure and have flexible start and stop times. Not to be used for critical applications

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

How many minutes of warning do you get if a spot instance is being reclaimed?

A

2 minutes

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

Can AMI’s be shared between AWS accounts?

A

Yes. You can give another account access to you AMI’s

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

What happens to an instances EBS volume when you create an AMI?

A

A snapshot is taken of each EBS volume attached to the instance.

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

What are the 3 types of placement groups?

A

Cluster: Clusters instances in a single AZ- low latency
Spread: Spreads instances across underlying hardware - limited to 7 instances/group/AZ
Partitioned: Spreads instances across partitions - different sets of racks in the same AZ

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

What acts as an instance level firewall for an EC2 instance?

A

A security group acts as an instance level firewall

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

With respect to an Ec2 instance volume:
Can you set termination protection to prevent accidental shutdown of the EC2 instance (protecting the instance state) .
And do you pay for storage on the instance volume?

A

No. Termination policy will not work as instance store data is dependent on the physical host. Storage on an instance store does not incur any costs over that of the EC2 instance.

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

Which instance state allows you to attach an Elastic Network Interface?

A

The Stopped state

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

How many EC2 instance can you have per subnet

A

There is a soft limit of 20 per region, but you can have as many as there are IP’s allocated to the CIDR minus 5 (for the AWS reserved IP’s)

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

Can you change an instance type when an instance is still running? If so, what happens to the instances EIP in this case?

A

No. The instance must be stopped. When the instance type is changed nothing happens to the EIP.

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

What is a spread placement group, and how many instances can you have per group?

A

Instances are spread across multiple racks in one or more AZ’s so all instances are on different tin. Highly redundant and is used where one failure in one instance must be isolated from the others. There is a limit of 7 instance per AZ per placement group.

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

For a dedicated instance, do other customers share the hardware?

A

No.

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

What is the timeframe that you can reserve an Ec2 instance for?

A

1 or 3 years

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

What is a burstable instance?

A

T2/T3 instances are burstable. This means that there can be bursts of CPU activity beyond the provisioned types for processing spikes in load. Bursts are based on the number of credits that accrue hourly. If the credits become exhausted then we will get poor performance. If the instance is consistently low on burst credits, it will need to have its specs upped.

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

There are two classes of burstable instances (as opposed to instance types). What are they?

A

There are limited and unlimited burstable classes. Be careful with unlimited as these can be very costly.

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

Can you copy an AMI that has been shared that has a billing product code associated with it?

A

No. You need to create an instance from the AMI and then create an AMI from that instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
Which of the following EC2 instance states are you billed for:
Running
Stopping to Hibernate
Pending
Stopping to Stop
A

Running

Stopping to Hibernate

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

What is a partitioned placement group, can it be multi AZ and what is the usecase?

A

A partitioned group operates WITHIN an AZ. Instances are partitioned over differing racks WITHIN the AZ. If the rack fails, then all instances on that rack fail. You can only have 7 partitions per AZ. Use for cassandra, kafka, HDFS and HBASE.

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

What happens to the ownership of a shared AMI?

A

Nothing. Sharing the AMI does not impact the ownership. The account that created the AMI still owns it.

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

If you copy an AMI that is shared with you, what permissions does the AMI owner need to grant you? (Hint: Think Storage)

A

The owner needs to give you read permissions to the storage backing the AMI - Either EBS snapshots or S3.

22
Q

You get a permissions error when attempting to SSH to an EC2 instance - why?

A

The wrong permissions are applied to the pem key file. Chmod 0400 will fix.

23
Q

Why would you use a reserved instance?

A

You use a reserved instance for a fixed, steady state usage

24
Q

If you are running a convertible reserved instance, can you convert to one with less compute?

A

No, you must convert to either equal or greater compute.

25
Q

Why would you use a scheduled reserved instance?

A

When you need reserved capacity but only for certain time periods which regularly occur.

26
Q

You have an application deployed on a T3 instance type. Its performance is degrading after servicing a massive spike in load. Why?

A

Its a burstable instance and the burst credits have been exhausted during the spike period, therefore CPU performance had degraded.

27
Q

Is an AMI global?

A

No. AMI’s are regional

28
Q

Where is an AMI stored?

A

On S3

29
Q

Which placement group places all instances on the same rack and when would you use it?

A

Cluster placement group. You would use this for applications or processing that requires very low latency such as big data jobs that need to complete fast. There is a much higher risk of failure than with spread or partitioned.

30
Q

What is a cluster placement group and what are the drawbacks?

A

A cluster placement group places all instances on the same rack in the same AZ. It gives you 10Gbps networking but is less fault tolerant than the other group types. Use for big data jobs that need to complete fast and for low latency high throughput networking.

31
Q

What instance type would typically be used for a web server?

A

Typically an M type instance would offer a good medium level of balanced cpu/memory provisioning

32
Q

How many IPOS can you reach with a IO optimised EBS volume type?

A

64KIOPS for Nitro based instances, 32 KIOPS for all others.

33
Q

If you have a software license that does not support multi tenancy virtualisation, what instance type would you use?

A

Dedicated host as this will give you access to the number of cores and sockets

34
Q

In a partition placement group, how many partitions can you have per AZ and how many instances can you have in each partition

A

7 Partitions per AZ. Hundreds of instances per partition

35
Q

In a partition group what happens to:
-The instances in a partition
-The instances in other partitions
In the event of a partition failure?

A

Instances in the failed partition may be impacted. Instances in other partitions will remain unaffected.

36
Q

What workload is best served by a partition placement group.

A

Big Data, HDFS, HADOOP.

37
Q

What are the main EC2 instance types?

A
R-RAM/Memory Optimised
C - CPU optimised
M - Medium, balanced load/GPurpose
I - IO Optimised
G - GPU based
T - Burstab;e
Radio Controlled MIG Burst
38
Q

Why would you use an EC2 G type instance?

A

Graphics based processors - Machine learning, video rendering, massively parallel workloads

39
Q

If you terminate an EC2 instance with an attached security group - what happens to that security group?

A

Nothing - Security groups are independent of the instance.

40
Q

What is the advantage of using an AMI with software installed as opposed to installing software with a boot script?

A

Speed - the AMI becomes your golden AMI and will boot faster as it does not need to install software on startup.

41
Q

How often is a user data script run?

A

Once, and only once on the first instance startup.

42
Q

What account are user data boot scripts run as?

A

Root

43
Q

Whats the maximum number of instance in a spread placement group

A

Seven

44
Q

What does a partition placement group offer in terms of scalability that the other placement groups do not?

A

Scale to 100’s of instances per placement group. A spread group only allows seven instances.

45
Q

You need a fleet of instances, which when they start have software already installed. How would you achieve this?

A

You would use a golden AMI with all software pre-loaded.

46
Q

You have built and published an AMI in us-southeast-1. Your colleague is in us-east-1 can’t access this. Why?

A

AMI’s are region locked.

47
Q

Which of the following retieves an instances meta data?

  1. http://169.254.169.254/latest/metadata
  2. http://254.169.254.169/latest/metadata
A

1

48
Q

What is the difference between a key pair and an access key?

A

A key pair is used to connect and login to an EC2 instance. An access key is used for API calls, SDK and CLI interactions.

49
Q

What Ec2 instance states allow for the following attachment types:
Hot
Warm
Cold

A

Hot: Running
Warm: Stopped
Cold: Launching

50
Q

What are EC2 pricing models and what are they used for?

A

On Demand: Short loads, predictable pricing
Spot: Short flexible and resilient workloads that can be rescheduled
Reserved: Long workloads, reserved capacity 1 or 3 year term
Convertible Reserved: Allows changing of instance types
Scheduled Reserved: Launch a RI within a time window
Dedicated Instance: H/W will not be shared
Dedicated Host:: Book entire physical host and you control placements.

51
Q

What CANNOT be changed on an existing EC2 Instance?

  • AMI
  • Instance Type
  • Security Group
  • Public IP
A

AMI

52
Q

Can you copy an encrypted shared AMI from another account? What if the encryption key is shared with you?

A

No. If the encryption key is shared with you, you can copy while re-encrypting it with your own key - then you become the new owner