AWS EC2 Flashcards

1
Q

List the EC2 instance categories.

A

Spot Instance
On-Demand Instances
Reserved Instances

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

Explain what an AWS ec2 spot instance is and how it functions?

A

An AWS EC2 Spot Instance is a type of virtual machine in Amazon EC2 that allows you to use spare Amazon EC2 computing capacity at up to 90% discount compared to On-Demand pricing. However, they come with the trade-off of being interruptible by AWS when the capacity is needed for On-Demand instances.
🧠 Key Concepts:
✅ What is it?

A Spot Instance is an EC2 instance that AWS can terminate with a 2-minute warning when it needs the capacity back.

You can request these instances at a lower price, making them great for cost-saving in non-critical or flexible workloads.

⚙️ How it Functions:

Requesting a Spot Instance:

    You request a Spot Instance like any other EC2 instance, but you specify that it's a Spot Instance.

    You can either specify the maximum price you're willing to pay or use the default setting (pay current spot price).

AWS Matches Supply & Demand:

    When AWS has excess capacity, it fulfills your request at the current Spot price, which fluctuates based on availability and demand.

Instance is Launched:

    If capacity is available and your bid is high enough (or the default pricing is sufficient), the Spot Instance is launched.

Possible Interruption:

    If AWS needs the capacity back (e.g., for On-Demand usage), your Spot Instance is terminated, stopped, or hibernated with a 2-minute warning.

    You should always design your applications to handle interruptions gracefully.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain what an ec2 reserved instances?

A

An EC2 Reserved Instance (RI) is a pricing option in Amazon EC2 (Elastic Compute Cloud) that allows you to commit to using a specific instance type in a particular region or Availability Zone for a 1- or 3-year term in exchange for significant cost savings (up to 75%) compared to On-Demand instance pricing.

Key Concepts:

  • Reservation, not a physical instance: A Reserved Instance is not a separate EC2 instance, but a billing discount applied to matching On-Demand usage.
  • 💸 Lower cost: You pay less compared to On-Demand prices because you commit to using it long-term.
  • 📍 Scoped to Region or Availability Zone:
    • Regional RIs give flexibility across AZs.
    • Zonal RIs reserve capacity in a specific AZ.
  • ⚙️ Attributes must match for the discount to apply:
    • Instance type (e.g., t3.medium)
    • Platform (Linux/Windows)
    • Tenancy (Shared or Dedicated)
    • Scope (Region/AZ)

Payment Options:
1. All Upfront (AURI) – Pay everything at once.
2. Partial Upfront (PURI) – Pay some now, rest monthly.
3. No Upfront (NURI) – Pay monthly, no initial payment.

Use Cases:
- Predictable workloads
- Applications with steady-state usage
- Long-running production systems

If you’d like, I can quiz you on this to reinforce your understanding. Want a question?

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

What is a on demand instance?

A

You use what you need and pay as you go.

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

When using a reserved instance are you guaranteed you will be able to provision the EC2 instance when need, even if the AWS region is at 100% capacity.

A

Yes

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

When using spot instances are you gaurenteed resources?

A

no the instance may be taken back at any point in time with 2 minutes warning

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

When using spot instance can the instance be stoped at any time?

A

yes, the instance can be stopped at any time and recovered by AWS

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

When using reserved instance can the instance be stoped at any time?

A

No reserved instances are guaranteed and will not be recovered by AWS at any point unless there’s a failure

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

When using on-demand instance can the instance be stoped at any time?

A

No.

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

With on demand instance are you gaurenteed resources

A

No.

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

Is a spot instance the best choice for a situation where the load is constantly changing and the workload cannot be interrupted?

A

no this is not a good choice to use a sparked instance in this situation as the Lord um says that it cannot be interrupted and this could be the case for a spot instance and an On-Demand instance is probably better or a reserved instance

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

Is spot instances a lower cost then other instance types?

A

yes spot instance is a lower cost than the on-demand or reserved

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

What sort of processes are best suited to spot instances?

A

The process is best suited to using spot instances are where the process can be interrupted at any point in time and recovered at a later point, started tart again

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

If you know you will need an instance 24/7 365, what instance type is best suited to get the best value? The workload can not be interrupted.

A

Reserved as it gives you the low price as you pay upfront and are guarantee the resources.

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

For AWS Ec2 instances, when you buy a reserved instance is it in all availability zones?

A

Great question!

When you purchase an AWS EC2 Reserved Instance (RI), it is not automatically available in all Availability Zones (AZs). Here’s how it works:

Scope of Reserved Instances
You can choose one of two scopes when purchasing a Reserved Instance:

  1. Availability Zone (AZ) Scoped
    - Bound to a specific Availability Zone (e.g., us-east-1a)
    - Provides a capacity reservation, ensuring availability of the instance in that AZ.
    - Best when you need guaranteed capacity in a specific AZ.
  1. Region Scoped
    - Applies to any Availability Zone within the region (e.g., us-east-1)
    - Does not reserve capacity (i.e., no guaranteed availability)
    - More flexible — EC2 usage across any AZ in the region can use the discounted rate.

Summary Table:

Let me know if you’d like a follow-up question on EC2 RIs or a scenario-based quiz to test your understanding!

Scope | Applies To | Capacity Reservation | Flexibility |
|——-|————|———————-|————-|
| AZ Scoped | Specific Availability Zone | ✅ Yes | ❌ Less flexible |
| Region Scoped | Any AZ in the region | ❌ No | ✅ More flexible |

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

In AWS and EC2, can you transfer a reserved instances from one availability zone to another ?

A

No, you cannot transfer a Reserved Instance (RI) directly between Availability Zones.

However, you can modify a Zonal Reserved Instance to change its Availability Zone within the same region.
This flexibility applies only to Standard RIs, not Convertible RIs.

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

In AWS and EC2, if you have a large reserved instance and no longer need it but need a number of smaller instances, what can you do?

A

You can create a number of small instances from a large reserved instance.

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

In AWS and EC2, what is the default number of instances you can create ?

A

20

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

In AWS and EC2, how many elastic IPs do you get by default?

A

5

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

In AWS and EC2, when you reach the default max limits of EIPs or Instances, what can you do to get more resources?

A

You can create a service quota increase from AWS to give you more resources

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

Is ES2 instances fault tolerant?

A

No, you have to architect a solution with fault tolerance; no, it’s a single virtual machine sitting on a server in a rack and susceptible to fault, um, according to the rack. very little guarantees are given by AWS

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

Explain how ES2 instances integrate with AWS IAM?

A
  1. Amazon EC2 (ES2) instances integrate with AWS IAM using IAM roles that provide temporary credentials to applications on the instance.
  2. These roles are assigned when launching the instance, and credentials are automatically rotated and made available via the instance metadata service.
  3. This allows secure, keyless access to AWS services like S3 or DynamoDB from EC2 without hardcoding credentials.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the easiest way for application running on a EC2 instance to use the AWS service API’s with out needing IAM keys?

A

Create a IAM role for EC2 instance.

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

What is EC2?

A

Elastic cloud compute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Are you paying for compute resource when the VM is stopped?
No.
26
When a instances is stopped are you paying for any other resources used by the instance?
Storage used by EC2.
27
What are the EC2 classic instances sizes?
micro, small, medium, large.
28
If you what to stop some one stopping you instance by mistake, what can you do?
You can check the 'terminate protection' check box.
29
What is a EC2 instance created from?
AMI's.
30
What are AMI's?
An AMI is a sort of a template containing all the information required for creating one or more EC2 instances. The template(AMI) consists of, - Owner - Launch permissions - Architecture (64-bit X86 or 64bit-ARM) - Operating system - Block devise mapping
31
Is it possible for you to create a custom AMI?
Yes, you can build a custom AMI for Linux and Windows.
32
What services do you use to give EC2 instances volumes?
EBS.
33
What do you pay for with EC2?
Compute time if the instance is powered on, storage, data transfer.
34
There are currently two places a EC2 instance can store data, what are they?
Instance store and EBS.
35
Where a instance is using a instance store and you stop the instance, will you data persist?
No when you stop a instance the data is gone/deleted.
36
Where is the data stored when the EC2 instance is using a instance store.
Data is tired on the local had disks of the server and not remote storage.
37
What is EBS?
Elastic block store.
38
Where do EBS volumes live in relation to EC2 instance?
The volume is remote from the EC2 instance?
39
What are provisioned IOPS in relation to EBS?
The ability to configure the amount of IOPS you required for you EBS volume.
40
How would you calculate MB transfer per second?
IOPS + 16K chunks = MB transfer per second.
41
What sort of application would benefit from provisioned IOPS?
Database applications, because of the random read and write patterns.
42
What is the min for provisioned iops?
100
43
What is the max provisioned IOPS?
64000
44
What is the min size of the EBS volume?
1GB
45
What is the max size of a EBS volume?
1TB
46
What raid is used for a EBS volume?
Raid0
47
Can you connect a EBS volume to more then one instance?
No.
48
Is EBS a object store?
No it is a block store.
49
Is a EBS volume local storage on the server where the EC2 instance is running?
No it is network attached storage and is remove from the EC2 instance.
50
What is pre-warming a EBS volume?
This is where AWS will preform a erase on the volume the first time the volume is used and this has a large impact on performance.
51
Is it possible to snapshot a EBS volume?
Yes
52
Where are snapshots stored?
?????
53
Do you pay for snapshot storage?
?????
54
Are EBS snapshots incremental or full?
Incremental.
55
Why would you take frequent snapshots?
To increase durability?
56
Do snapshots degrade application performance what they are happening?
Yes.
57
Will data persist on a EBS volume?
Yes.
58
What Linux command would you use to touch every block on the volume during pre-warming?
dd command.
59
How would you backup a EBS volume?
take a snapshot.
60
How can you move a EBS volume to another availability zone?
??
61
Can you schedule snapshots?
yes using the aws command line tools.
62
What is user data used (script) used for, in reference to EC2.
This is a script that is run at the beginning of VM boot up.
63
What is the cloud-init script used for, in reference to EC2.
This is a script that is run at the beginning of VM boot up.
64
How can you from a script or applications access the EC2 features?
API or execute use the CLI.
65
When you create a new EC2-Classic instance dose it get a public IP?
Yes
66
When you create a new EC2-Classic instance dose it get a private IP?
Yes
67
When you create a new EC2-Classic instance dose it get a CNAME?
Yes
68
When you start or stop the instance will the private IP change, when using EC2-Classic?
Yes
69
When you start or stop the instance will the public IP change, when using EC2-Classic?
Yes
70
When you start or stop the instance will the CNAME change, when using EC2-Classic?
Yes
71
How can you assign a static IP for a for a EC2-Classic?
Assign a elastic IP.
72
Is a elastic IP a public or private IP?
Public.
73
How many elastic IP's can we assign to a EC2-Classice instance?
0ne per instance
74
What is the default number of elastic IP you get?
You get 5.
75
Can you request more elastic IP?
Yes.
76
When using elastic IP's and you shutdown a instance, will the elastic ip change?
No.
77
Can you detach and reattach a elastic IP to a new EC2 instance?
Yes.
78
When you stop a instance is the elastic ip detached
yes and you will have to reattach it to the instance.
79
What is the elastic load balancer used for?
To distribute traffic between EC2 instances.
80
Can the elastic load balance be used with other services?
No it is used for distributing traffic to EC2 instances in a ELB group.
81
When using the ELB and a instance stops will ELB keep sending traffic to the failed instance?
No ELB will detect that the instance has failed and stop sending traffic.
82
How do a ELB detact when an instance has faild?
ELB will send pings to the instance and after a treshold of faild pings the ELB will stop sending traffic to the faild instan
83
Dose ELB store SSL certificates?
Yes ELB is used to store SSl certificates.
84
Is it best practice to put sensitive data in the tags/metadata?
No as the tags/metadata is not encrypted.
85
For EC2-Classic security groups is there filtering on outgoing traffic?
No.
86
With regard to EC2-Classic, by default has the security group got port 22(ssh) open?
Yes.
87
With regard to EC2-Classic, by default has the security group got ports other then 22(ssh) open?
No.
88
Can you monitor a EC2 instance?
You can monitor the instance from a hardware perspective.
89
What EC2 monitoring parameters do you get by default?
CPU, Disk Reads, Disk Writes, Disk read operations, Network in, Network out, status check failed instance, status check failed system, .
90
Are the EC2 monitoring parameters the host parameters or the VM OS parameters?
Host parameters.
91
With EC2 basic monitoring is the interval time 1min?
No the basic monitoring is 5min, this is the default monitoring.
92
With regard to EC2 monitoring the default interval is 5min, can you get a faster interval limit?
Yes you can have 1min.
93
With regard to EC2 monitoring the default interval is 5min and when you select a interval of 1min do you pay for it?
Yes you pay extra.
94
Is it possible to create alarms with EC2 monitoring?
Yes you can create alarms and have them monitored by CloudWatch.
95
Can you attach a volume in one AZ to a instance in another AZ?
No.
96
Can you launch a volume from a snapshot?
Yes.
97
How would you move a volume from one AZ to another?
Create a snapshot, create volume from image.
98
How would you copy a volume from one AZ region to another AZ region?
Create snapshot, copy snapshot (this will gibe you region options)
99
Do EBS volumes exist outside of a AZ and with in the region?
No, volumes exist with in the AZ (data centre)
100
How can you create a image from a snapshot?
AWS provides a create image from snapshot function.
101
How many 9's availability has a EBS volume snapshot?
4 x 9s.
102
Where are EBS volume snapshots stored?
On AWS S3 storage.
103
How may 9's durability has EBS snapshots?
11 X 9's.
104
Are snapshots full or incremental snapshots?
Snapshots are incremental.
105
What is a provisioned IOPS EBS volume?
It is a volume where you have defined the IOPS for the volume.
106
With provisioned IOPS EBS volume do you pay any other charges then the storage charge?
Yes you pay for the IOP's.
107
Can you attaches multiple volumes to a instance?
Yes.
108
What durability has a EBS volume?
Data is replicated with in a AZ to ensure again a single disk failure.
109
Dose amazon offer the ability to encrypt a EBS volume?
No.
110
Dose Ubuntu support user data ?
Yes, user data is much like cloud init and is supported by Ubuntu.
111
Dose amazon distro's support user date?
Yes, user data is much like cloud init and is supported by amazon distro.
112
What is user date?
It is a plane bash script that is run by supported distros during start up.
113
What is a security group?
It is like a firewall.
114
When security groups with EC2-Classic can you filter outgoing traffic?
No filtering is on input traffic only.
115
Do instances with in the same security group require ports to be opened in the security group to enable inter instance communicate?
No instances in the same security group are free to send and receive traffic between other instances.
116
Can instances in two different security groups communicate with each other by default?
No, instances in separate security groups require ports to be opened in the security groups.
117
With regard to security groups, is it possible to allow all traffic one group to communicate with instances in another group?
Yes, you can use all t traffic and the group id instead of 0.0.0.0/0.
118
What types of placement groups are they?
- Clustered - Partitioned - Spread
119
I have an HPC workload, how should I deploy this with a placement group?
Clustered, keeping the instances close together for high bandwidth, low latency. This way they get a 10G non-blocking network. But they are exposed to be on the same hardware and failure can take all instances down.
120
What type of network is important when using clustered placement groups?
In clustered placement groups you get a 10GiB network thet is non-blocking and low latency.
121
Are Clustered placement groups available across AZ's?
No, all instances have to live inside a single AZ.
122
If you are using provisioned IOPS, do you have to pay for them even if you do not use them?
Yes.
123
What is the default interval that CloudWatch will monitor at?
5min.
124
Is detailed CloudWatch monitoring enabled on a per instances basis?
True.
125
Is it AWS best practice to store secret/access keys on the AMI?
No.
126
With regard to EC2-Classic, can you change a instances security group with our removing the instance?
No.
127
With regard to EC2-Classic, how can you change the security group?
You can not, but you can boot a instance from existing AMI into the new security group.
128
Can a instance be a member of more then one security group?
Yes.
129
With regard to EC2-Instance, will the EIP become detached when the instance is stopped?
Yes
130
With regard to EC2-Instance, when you stop and start a instance will the EIP automatically get reattached?
No you have to manually reattach it.
131
Is EC2 a global, region or availability zone service?
It is a availability zone service.
132
When a instance is in a VPC and it is stopped and started dose it loose it's Elastic IP?
No.
133
When you start and stop and instance in a VPC, will the instance lose it private iP?
?????
134
What is Intel's AES-NI?
AES-NI is 7 new Intel instructions for AES.
135
What is Intel's DRNG?
It is a digital random number generator in the CPU, used with encryption.
136
What are placement groups?
Placement groups control how EC2 instances are place, you can have 3 different types, - Clustered - Spread - Partationed
137
When selecting a reserved instance, what are the attributes that apply
- Instance type - Scope: Wheather applies to a region or a AZ - Tenancy: shared or single - Platform: Windows or Linux
138
I have a reserved instance they expired, will the instance stop running?
No, the instance will keep running but is billed as on-demand rate.
139
Is a reserved instance a physical or virtual instance reserved for your usage?
No, it is as billing construct applied to your account.
140
What is a standard and convertible instance?
It is used when reserviceng an instance, a standard instance can miodify AZ,Scope, network,platfrom and instance size with ins same instance type. A convertable iinstance can
141
Can I sell a standard reserved instance in the market place?
Yes
142
Can I sell a convertible reserved instance in the market place?
No
143
What is a reserved instance?
You make a 1 or 3-year commitment and receive a significant discount over on-demand. Up to 75%.
144
What are reserved instances good for?
Stady state workloads.
145
What is a reserved instance with a capacity reservation?
This is where you reserve the capacity, you are guaranteed to be able to create an instance when needed.
146
What are the upfront option available?
- No Upfront - Partial upfront: Up to 76%, you pay only for the hours after the up front - All upfront, you do not pay for any hours during term
147
I have five EC2 instances that will share huge amounts of data between them, how should I place them?
You will need a low latency network thet is also high speed. Clustered placement groups give you 10GB bandwidth and low latency. All in a single AZ.
148
What is placement group - cluster?
Cluster – creates a cluster of instances in a single AV with a 10GiB network and low latency non-blocking.
149
What is placement group - partition?
Spreads instances in groups across racks. Multiple AZ.
150
What is placement group - spread?
A spread placement group is a group of instances that are each placed on distinct racks, with each rack having its own network and power source. Multiple AZ.
151
When using a clustered placement group, what are the attributes I need to think of?
Single-AZ 10Gpbs non-blocking Means Instances will be place in same rack. Instance type need to have enhanced networking to make bets use
152
I have a workload that requires the three hosts to have the hastes, lowest latency network possible, we are not worried about availability or durability of the workload, what is my bets poption?
Use clustered placement group, the cluster placement group will cluster the hosts logically so they have 10GB non-blocking network.
153
I need to spread my instances across a single AZ in groups, but I want to ensure the instances in the groups are not on the same hardware, what is my best option?
Use partition placement groups, this will enable you to spread across a single AZ and no instance will be placed on the same host and another instance.
154
When using placement groups, what do I need to be aware of?
The hardware available will be of limited size, you may when launching gets an error, just wait and try again.
155
I want to ensure my instances do not share the same hardware dor availability purpus, I wnat to place the instances in two AZ, what options do I have
Spread placement groups, spread placement groups enable you to spread instances and no two of the cases will be on the same hardware, also these can be spread across two AZ.
156
What is the limit size of spread placement group?
7 Instances.
157
Can I have placement groups across regions?
No
158
Can I have placement groups across AZ
Yes but only spread placement group.
159
I want to use a T1 micro with a placement group is there any issues?
Yes, clustered PG are high-performance networking and require an instance with enhanced networking, but spread PG will work.
160
I need to create a copy of an instance in another region, can I just snapshot and copy?
Yes, create an AMI and copy the AMI to another region.
161
I need to copy an AMI to another region, is this possible?
Yes
162
I have an instance running as on-demand and default-tenancy, I want to change this instance to single-tenant, how cna I do this?
You have to stop the instance to ensure no changes are happening to the instance, create an AMI and launch a new instance.
163
What is the reserved billing model?
You can reserve an instance like RDS, EC2, DynamoDB.
164
I need 100% guarantee that I will be able to have capacity available when I need to start up and instance, what options do I have?
You cna use availability zone reserved instance, this will guarantee that I can spin up instances in AZ when needed.
165
What is the difference between availability and regional reserved instances?
Availability reserved instance give you a guarantee that you can have the capacity to sping up an instance, regional reserved does not.
166
What are the payment models for reserved instances?
All upfront, partial, and no upfront.
167
What is the 3 billing models for instances?
- On demand - Reserved - Spot
168
For reserved billing model, what is the available billing terms?
12 or 36 months
169
I am using spot instance and I need to get notified when an instance is been reclaimed by AWS, what are my options?
You get a termination notice from the metadata server here, http://169.254.169.254/latest/meta-data/spot/termination-time
170
Can I have multiple network interfaces?
Yes
171
Are security groups associated with the instance or the ENI (network interface)?
ENI
172
What is the first ENI on an instance called?
Elastic Network Interface.
173
What is the root volume of an EC2 instance?
It is the volume used for booting off of.
174
I wnat to create an AMI for my instance, can this be done directly in the API or portal and if so what sequence of events happen in AWS?
Yes, you can create an AMI direct in the portal using Create Image. This will create snapshots of the instance root volume and any attached volumes. The AMI will container the information for the size, volumes, etc. The AMI will reference the snapshots created, the AMI does not contain the volume/snapshot data.
175
Is the AMI a regional or global resource?
AMI's are regional resources if you wnat a copy of the AMI in another region you can copy it to the other region.
176
When you copy AMI to another region, what happens in AWS?
AWS will copy the AMI (template not the data ) and it will copy each of the volumes (snapshots). When finished you will have, the AMI and a snapshot for each of the volumes.
177
What are AMI permissions?
You can make the AMI public or private or share with an anoyther account,
178
I wnat to share my AMI with another account, can I do this?
Yes using AMI permissions.
179
What am I doing when I set an AMI permission to the public?
You are sharing your AMI with the AWS AMI community.
180
I have a really cool todo list app that I have packaged as an AMI, how could I sell this AMI?
You can use the AMI market place, you add a price so the total price to the user is the AWS resource cost and your cost for the software.
181
I need bare-metal performance for an instance, what options do I have?
Two options, - Bare metal -Nitro Nitro is probably the better choice.
182
I need to get better network and storage performance what choosing instance technology, what options do I| have?
SIROV
183
What types of storage are available to an instance?
- Instance store - GP2 - IO1 - St1 - Sc1 - Provisioned IOPS
184
I need to store tempory data fast for an instance, what is my best option?
Instance stored volumes where I can store the data on the disk (SSD) on the instance the hardware is running on.
185
What type of storage is instance storage?
- Tempory - On the same hardware as an instance - NVMe
186
I need real fast tempory storage, it needs to be higher throughput than a single instance store, what options do I have?
RAID a number of instances stores
187
I need to ensure that my EBS storage has consistency, what options do I have?
Use storage optimised instances as they have dedicated storage path on the network
188
I need shared storage, I am thinking of EBS, is this the correct storage?
No, EBS is attached to a single instance only and can not be shared, EFS could be an option.
189
I am thinking of using EBS for high durability requiring 99.9999% storage, is EBS a good choice?
No, EBS has only 99.95 - 99.99% durability.
190
Is a snapshot full or incremental?
Incremental.
191
I need to ensure that my instance is recoverable in the event of a failure, what options do I have?
Take a snapshot, the snapshot is stored in s3 and as such has a higher degree of durability then EBS.
192
I needed to increase the durability of my EBS volume, how can I do this?
Take a snapshot (backup) and store it in s3, in S3 data dat is across AZ's and 11 9s durables.
193
Is snapshot consistent?
No, you have to do one of two things, you have to shut the instance down or unmount the volume.
194
I wnat to move my instance between AZs, how can do this?
You will have to take a snapshot of the instance EBS volume and then use the snapshot to create a new instance in the other AZ.
195
I am thinking of using EBS for static content, is this a good option or what else should I use?
Do not use EBS, use S3.
196
How do the IAM role credentials (accesskey, securitykey) get to the application on the instance?
When you assign a role to an instance, the STS creates a set of creds (access + security keys), these are pushed to the metadata server, your app can get these form the metadata server. To get the STS, the instance service is assuming the role and in so getting the STS creds, what is happening is there is a trust relationship for the role between the role and the ec2 instance.
197
When would I use an IAM Role with an EC2 instance?
Anytime your application running on the EC2 instance wants to call other AWS services API.
198
What types of placement groups can we have?
- Cluster PG: In a single AZ, Highspeed low latency - Petition PG - Spread PG
199
What characteristics has a Clustered Placement Group?
- For the highest network performance as all VM's are close to each other as possible. - Latency is a minium - Placement group is in a single AZ - Susceptible to failure of AW or hardware as this could be on a single rack, server and is in a single AZ
200
I have a workload that requires the ability to calculated a genome in a distributed fashion, how can I make this happen using EC2 instance and what will the configuration be?
- Large compute optimised instance type like c5n.18xlarge - Clustered placement group to ensure network latency is a minimum - Ensure the workload can deal with failure as the instances will be in close proximity to each other.
201
I am creating a clustered placement group, when provisioning this clustered PG, what possible error cloud I get from AWS?
You could get an error in relation to these not being enough resource for your request. This is due to the close proximity of resource needed in a placement group.
202
I wnat to add instances to an existing clustered placement group, how cna I do this?
You cna add instances to an existing PG but you may get capacity issues as AWS provisioned everything up front. You are best to delete the CPG and recreate it.
203
Should you mix instances type in a clustered placement group?
No.
204
I need to pick a placement group for performance, what type of placement group should I pick?
Clustered PG as it keeps the instances close to each other physically giving best network performance and latency.
205
I need to puck a placement group for resiliency, what type of PG should I use?
You should use spread PG as all the instances will be spread across AZ's and ensure they are as far apart within the available AZ's
206
What is a spread placement group?
It is a PG that spreads you instances across AZ's and ensure they now VM's are on the same hardware if possible. Does this give the highest level of resiliency?
207
Which of the placement groups gives you the best resilience and why?
Spread placement groups ensure your instances are spread across AZs and kept on separate hardware.
208
What is a partition placement group?
This will spread SETS of instance across AZ's. The SETS are grouped close but each set is distributed across the AZ's.
209
I an add instance sot spread placement groups after the SPG is deployed?
Yes
210
I need to have 21 instances use a spread placement group, how should this be configured?
You will have to have 3 AZs as an SPG can only have 7 instances per AZ.
211
Can you use a VPC peer with Cluster Placement Groups?
Yes
212
Can I deploy clustered PG across AZ's?
No.
213
I need 10GB flow for traffic, what is my best option for deploying 3 instances for performing a calculation?
Clustered PG as you cna get 10GB traffic flow.
214
What type of networking does a cluster placement group get?
As all instances are physically close in the same AZ, you get 10GB, no-blocking, non-oversubscribed.
215
How does AWS deploy partition placement groups?
AWS groups you instance sin to partition, so where you have 9 instance you get 3 partition of 3 instances. Each of the 3 instance partitions is put on separate rach with own pwr, network, etc. Partitions are spread across AZ's within the regions. No two partitions share the same rack.
216
What is the Data Life Cycle Manager
DLM enables you to create a policy that enables backup of your EBS volumes.
217
For Data Life Cycle Manager how do you create a policy and apply it to a volume?
You create a policy, define one or more tags, a schedule,
218
I wnat to backup by EBS volumes, in my enterprise, do I create a CRON job or something else?
You can use the Data Life Cycle Manager to backup your EBS volumes, you define one or more volume tags and schedule.
219
I have an online t-shirt web store, the number of customers is extremely variable and near impossible to predict workload, I have to select a billing model for my EC2 instances, what are my best options?
You should select on-demand as you do not know the workload from hour to an hour and day to day.
220
I have an online t-shirt web store, the number of customers is steady at a base lone and also peeks, how should I select a billing model?
Select reserved for the baseline and on-demand for the peeks. If the web apps can deal with been terminated use spot instead of on-demand.
221
I need to be able to ensure that I can always start my EC2 instances even if an AZ fails or there is high demand for instances in AWS, what is my best option?
Reserved will ensure you can always start your instances.
222
What is a scheduled reserved instance?
This is where you receive the instance by a day or hour if you are doing it regularly.
223
What is a spot instance pool?
Is a group of instances of the same type, a spot pool is used with a spot fleet
224
How much can I save on the cost of a spot instance?
60 - 90%
225
How much can you save on reserved instance?
60% (3year commit)
226
How does spot pricing work/
After MAR 2018 you just pay the spot price in effect for each hour.
227
What is EC2 fleet and how does it work?
EC2 Fleet enables you to define a capacity that you would like, this can be in the form of any instance sizes and use spot or on-demand. EC2 Fleet will attempt to create a pool of instance according to your desired capacity.
228
I wnat to have a pool of computing as a baseline for number crunching, some times we need results faster and we would like to be able to take advantage of lower pricing spot instances, what can I do?
You cna use fleet to define the pool fo ec2 instance you wnat and when needed change the fleet config to use spot instances when the spot price is where you are willing to pay for it.
229
What is AMI baking?
This is where we create an AMI with everything you need baked-in, like a web server and its configuration-
230
If I have an autoscaling group and I wnat to be able to very quickly spin up instances, I can wait for use data scripts to execute as the lag would defeat the requirement to sping up quick, what are my options?
You can use AMI baking, this is where you create an AMI with the apps such as web servicer and the configuration into the AMI.
231
What are the two components of an autoscaling group?
Launch template and autoscaling group
232
Can I use spot instances with Autoscaling groups?
Yes 100%, you define it in the launch config.
233
I have an already deployed Autoscaling group with launch config, I needed to make changes to the launch config, can I just edit the launch config?
No, you have to create a new launch config.
234
Can an autoscaling group have a second launch config?
No
235
Whts is the difference between the launch config and launch template?
Launch templates are the newer way, you have lots more
236
What happens if an instance in an autoscaling group fails?
The instance is replaced.
237
What is health check grace?
It is the time waited before an autoscale group checks the health of an instance, it gives instance time to build and become stable.
238
I wnat to know when an autoscaling group changes, how cna I achieve this?
SNS can use with Autoscaling groups.
239
Can I manually edit the auto scaling group to do things like the increase desired number of instances?
Yes.
240
What is a scaling policy?
``` Scaling policy enables you to use metrics to scale up or down. Metric types, - CPU Utilization -Net in or Out - Load balancer request count ```
241
What are the AutoScaling policy types?
Simple Scaling steps Tracking
242
Explain simple AustScaling policy type?
The simple policy type enables you to react to
243
Explain the target tracking AustScaling policy type?
With target tracking, you set what you wnat the metric (CPU) to be an AS will add or remove instances to try to match it.
244
Between 2 - 3 pm each day my web server workload increase, what would be a good option for autoscaling so as not to have a delay when loads start to increase?
Create a schedule and have the autoscaling group increase it number f instance in advance and then scale back down after the event has finished.
245
I am building a set of web servers and autoscaling and I wnat to be able to take advantage of both spot and on-demand instances, is this possible?
Yes, you can when creating autoscaling opt to use the fleet model of using both spot and on-demand instances.
246
I am using an auto scaling group, I require a notification to be sent what action like scale up occurs, how can we architect this?
Autoscaling has the ability to set up SNS to send a notification for, - Launch - Terminate - Fail to launch - Fail to terminate
247
I wnat to get a notification when the autoscaling group fails to launch so we can have a ticket raided in our ITSM, how can I configure AutoScaling for this?
AutoScaling has a notification where we can configure notifications for the failed launch of instances to be sent to SNS.
248
I wnat to get a notification when the autoscaling group fails to terminate so we can have a ticket raided in our ITSM, how can I configure AutoScaling for this?
AutoScaling has a notification where we can configure notifications for failed termination of instances to be sent to SNS.
249
Explain how we can monitor AutoScaling groups?
We cna enable group metrics for the autoscaling group
250
I wnat an Autoscaling policy to react based on how much the alarm is our by what would I need?
Auto-scaling with steps.
251
If I have 6 subnets and I deploy 12 instances, how are the instances distributed when using an autoscaling group?
All instances are distributed evenly, each subnet will get 2 instances.
252
I am using 3 AZs and an autoscaling group, I require a total of 12 instances to be running to service my workload, a failure of an AZ occurs, the Autoscaling group attempts to spin up the lost four instances in the remaining AZ's, but it gets our of capacity error, what can I do to fix this in the future?
Purchase reserved instances, another option is to add most AZ's and this way you lose less of your instances when an AZ goes down, you also get a better chance of finding space in the remaining AZ's
253
What is AWS Data Lifecycle Manager?
It allows you to schedule EBS snapshots
254
With AWS Data Lifecycle Manager, can I set a retention policy?
Yes
255
When using AWS Data Lifecycle Manager, what is the mandatory action I have to do with the EBS to get AWS Data Lifecycle Manager to work?
You have to add a tag so AWS Data Lifecycle Manager knows what to match the volumes it will snapshot.
256
I need to take EBS snapshots on a regular basis, once every 12 hrs, I am writing a script for a cron job, is this the bets solution?
No, it is better to use AWS Data Lifecycle Manager
257
For reserved instances with is the therm?
12 and 36mts
258
For reserved instances what is the upfront models available?
-All Upfront Partial No upfront
259
I require an instance but from day to day and week to week I do not know if I will need it, one other factor is when it is running I can not have it stoped for any reason, what are the bets instance billing model to use?
Use on-demand as you can use what you wnat when you need it and stop using instance when you do not need it.
260
What is the priority given to the EC2 instance billing model when starting n up?
- Spot = low priority - On-demand = natural priority - Reserved capacity= high priority
261
Is the reserved billing model only for EC2 instances?
No, it can be used for DynamoDB and also RDS instances.
262
When would I use reserved?
When I can predict my usage.
263
When I am acquiring a reservation, what is it tied to an AZ or a region?
Do you have the option of both?
264
I need to ensure thet when I need an instance it will always be able to start, what do I need to do?
You need to do a reservation and use an AZ, using a region will not guarantee capacity and be able to start up.
265
What types of hypervisor/physical options do I have with EC2?
- ParaVitrtual - HVM (Hardware Virtual Machine) - Nitro - Baremetal
266
What are the EC2 families?
- i : Storage optimised - T + M @ General purpose - C : Compute-optimized - F : FPGA - G : GPU - R : Memory optimised - A : ARM instances = P Accelerated computing (8 NVIDIA Tesla cards, CODO)
267
When would I use a C instance type?
When you need a compute-optimized workload.
268
When would I use I instance type?
When you need a storage optimized workloads.
269
When would I use an R instance type?
When you need a memory-optimized workload.
270
When would I use an M instance type?
For general workloads with consistent CPU usage
271
When would I use a T instance type?
For a general workload with bust cup usage.
272
When would I use a G instance type?
When I need a general workload with bursty CPU.
273
I have a general-purpose workload what instance type should I pick?
M or T, M got consistent CPU and T for bursty.
274
I have a bursty CPU workload, what type of instance should I pick?
T instance type.
275
In m5a,large, what is the 'a' telling us?
It is telling us that this is using AMD and not intel.
276
What way so the T instances work?
You gain credits when below the CPU threshold and you loose credit when above. When all credits are gone you cna have one of two things happen, performance is affected, or you pay a surcharge.
277
I am using T instance type, what are the two options when you are out of credits?
- You pay a surcharge | - Performance degrades
278
Explain how T type instances work?
The accumulate credit when below the threshold set for the instance type for CPU and use credit when above the threshold.
279
What are P instance types used for?
CUDA/NVIDIA
280
What is CRIMP-TGF?
``` C Compute optimised R Memory Optimised I storage optimised M General purpose P Accelerate for CUDA/NVIDAI ``` T is good for burst and is a general instance type, you have two options, when you are out of credits you can have performance degraded or you cna have a surcharge G UPU F FPGA
281
Do all instance type have instance storage?
No
282
What type of instance storage can you have?
NVME and SSD
283
What are instance storage type good for and why?
Instance storage is good for cache volume and transient storage, it is the highest speed read and writes..
284
How many instance volumes can I have?
0 - 24
285
If I do not have enough storage in a single instance volume how cna I add more?
You can RAID the instance storage volumes together to make a single combined volume. RAID 0 is best, no parity or mirror...
286
If I start and stop an instance will I lose the instance volume data?
Yes
287
If I restart the instance will I lose the instance volume data?
No
288
How cna I have the instance move to a new host?
Restart the instance.
289
I wnat to use shared storage, should I use instance storage?
No, because instance storage is transient.
290
I wnat to use persistent storage, should I use instance storage?
No, because instance storage is transient.
291
I wnat to use elastic storage, should I use instance storage?
No, because instance storage is transient.
292
I wnat to use durable storage, should I use instance storage?
No, because instance storage is transient.
293
What is an EC2 instance profile and where is it used?
An instance profile is a container for an IAM role that you can use to pass role information to an EC2 instance when the instance starts.
294
How many roles can I associate with an EC2 instance?
1
295
What types of placement groups are available?
- Clustered - Partitioned - Spread
296
I have an application thet runs on multiple instances and requires very low latency between instances, what is my best option?
Opt to use 'clustered placement group.' This will keep the in the same physical; location.
297
When would we use spread placement group?
Designed for a small number of instances across a single-az or multi-AZ, will spread out the instances evenly across the AZ.
298
How may AZ is a clustered placement group spread across?
A clustered placement group is located in just one AZ.
299
I have a placement group, and I need to add a node, how do I do it?
You can modify a placement group, you have to delete and replace.
300
I need extreme performance, as in my apps dose computation and the result between each node is share, requiring huge bandwidth between node, what is the best placement group type?
Clustered
301
I require resilience in my nodes and what to ensure they are always spread across AZ, what placement group type should I use?
Spread
302
When creating placement groups can I add instances ad-hoc when I need them?
No, you have to allocation all instance at the same time
303
I am using a placement group am I guaranteed to get all instances in the group at the time of provisioning?
No, as the instance for clustered placement group are going to be close proximity to each other, you may not have enough resources available at d provisioning time.
304
I need to add 5 new instances to an existing placement group, how can I do this?
You can not modify a placement group.
305
Do all instances support the placement groups?
No
306
I need to select a placement group for performance, what type of placement group should I pick?
Clustered
307
What is a partition placement group?
Where AWS creates a number of partitions and groups the instances in the partitions equally.
308
What is a spread placement group?
This is for a small number of instances spread across the largest number of different physical hardware.
309
Is a clustered placement group restricted to a single VPC?
No, it can space VPC's, but not availability zones, this would mean the VPC all have to be in the same AZ.
310
What is the main benefit of a clustered VPC?
10Gbit non-blocking, non-oversubscribed, bi-directional networking.
311
I have to create an HDFS, HBase, and Cassandra what placement group would use?
You would use a partitioned placement group.
312
Explain how AWS creates partitioned placement groups?
They create a number of partitions and place racks in the partitions across AZ's in a single region they then evenly distribute the instances.
313
What is the max number of partitions in the partitioned placement group?
7
314
I need to have the max availability and at the same time what to launch different instances at different points in time, what placement group would I use?
You would use a spread placement group, this will spread
315
When using EC2 is it a regional, global or AZ's product?
AZ, it is an AZ product and if an AZ was to fail you would lose your instance.
316
What does an AMI consist of?
- One or more EBS snapshots, or, for instance-store-backed AMIs, a template for the root volume of the instance (for example, an operating system, an application server, and applications). - Launch permissions that control which AWS accounts can use the AMI to launch instances. - A block device mapping that specifies the volumes to attach to the instance when it's launched.
317
Can I copy an AMI to another region?
Yes
318
When I create an AMI, do I get all the block devices and their mappings?
Yes, a snapshot is taken of each EBS black device and the AMI also keep the block device mapping.
319
Can you have Clustered placement groups across AZ?
No
320
Can you have Partitioned placement groups across AZ?
Yes
321
Can you have Spread placement groups across AZ?
Yes
322
Can you have Clustered placement groups across peered VPC?
Yes
323
How much discount fo you get from spot instances?
Up to 90%
324
How much discount do you get form on-demand?
Zero
325
How much discount do you get from RI?
40% - 60%
326
How much discount do you get from spot?
50% - 90%
327
How can I create a 1mi CPU instances?
You will need to use fleet, the fleet will enable you to target different capactty pools in a single region, this way you will be able to get the max number of instances.
328
How can you maintain a set of spot instances?
You have this option, you can select 'request and maintain ' in the console
329
Explain spot instances?
You ask for a pool fo spot instances and this is given to you, you get the current spot price, this price can be up to 70% discount.
330
I have a soilution and I wnat to ensure my instance recovers and keeps the same ip, how cna I do this?
When an instance fails and is restored, it will keep the same private IP. to recover we have to think about autoscaling form cloud-native or use cloud watch and StatusCheckFailed_System metric and use it to recover the instance.
331
Will the IP of an AWS recovered instance change?
No, the same instance IP, instance name and other parameters all say the same including the id.
332
How can I detect when an EC2 instances fails at the AWS level?
StatusCheckFailed_System will get triggered.
333
What is affinity host?
Affinity allows you to specify which Dedicated Host an instance will run on after it has been stopped and restarted. This gives you the confidence that the instance will run on the same physical server even through planned interruptions, helps reduce licensing costs in scenarios that require license affinity for a period of time (e.g., 90 days), and can be used to maintain an instance placement scheme.
334
Due to licencing, I wnat to control the placement of my software in the server, how cna I do this?
You can use a dedicated EC2 instance, you can define where (server)the software is placed.
335
What is EC2 dedicated?
This is where you get a whole server dedicated to you, you still are running EC2.
336
What are the advantages of EC2 dedicated?
You get to have a server thet you and you only run on, you can have it so when you stop and start instance it will always be on the same server.
337
Is Ec2 dedicated bare metal?
No, the instances that run on a Dedicated Host are the same virtualized instances that you’d get with traditional EC2 instances that use the Nitro or Xen hypervisor.
338
How does an EC2 dedicate how get allocated?
You allocated the host to the account, you can then create EC2 instances and have them deployed to the dedicated host. Or you can use the AWS Licence manager to have the software run on the dedicated host.
339
Can you use reservation with EC2 dedicated?
Yes
340
Can you use a service plan with EC2 dedicated?
Yes
341
Can I mix EC2 instance types on a EC2 dedicated server?
Yes
342
I need to ensure my MSSQL licence is always run on the same server, I can use RDS, what options do i have?
You cna used EC2 dedicated and you get a server thet is dedicated to you EC2 instances. You cna define the MSSQL server is only run on this server and this can be done with AWS Licence manager.
343
I require an ec2 instance with a large amount of RAM. What is the type I would select?
select type R
344
I require an application with a large amount of CPU, hat instance type would I select for ec2?
Select type C
345
I want to require an ec2 instance with good local IO what for a database; what uh instance type what I select
select type I
346
Do I require an instance type with GPU for video rendering and machine learning or an instance type that I select.
Select type G
347
What are the courage statistics of ec2 instances of type T2 T3?
these are burstable instances
348
By default, how are our AWS ec2 instances placed?
They are randomly placed across the availability zones
349
Explain an AWS ec2 placement group?
An AWS EC2 Placement Group is a logical grouping of instances that influences how they are placed on the underlying hardware. It supports strategies: Cluster (low latency, high throughput) Keeps the instances close together. Spread (instances across different hardware): keep the instances spread far apart, 7 instances per group. Partition (fault isolation) Placement groups help optimize performance or resilience based on your application's needs.
350
351