Add questions and exercises
In addition, move shell scripting questions into a separate file.
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
| Launch EC2 web instance | EC2 | [Exercise](launch_ec2_web_instance.md) | [Solution](solutions/launch_ec2_web_instance.md) | Easy |
|
||||
| Security Groups | EC2 | [Exercise](security_groups.md) | [Solution](solutions/security_groups.md) | Easy |
|
||||
| IAM Roles | EC2 + IAM | [Exercise](ec2_iam_roles.md) | [Solution](solutions/ec2_iam_roles.md) | Easy |
|
||||
| Spot Instances | EC2 | [Exercise](create_spot_instances.md) | [Solution](solutions/create_spot_instances.md) | Easy |
|
||||
|
||||
|
||||
#### AWS - Lambda
|
||||
@ -352,6 +353,12 @@ On Demand is good for short-term non-interrupted workloads (but it also has the
|
||||
Reserved instances: they are cheaper than on-demand and the instance is yours for the chosen period of time.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Which pricing model has potentially the biggest discount and what its advantage</summary><br><b>
|
||||
|
||||
Spot instances provide the biggest discount but has the disadvantage of risking losing them due bigger bid price.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>You need an instance for two years, but only between 10:00-15:00 every day. Which pricing model would you use?</summary><br><b>
|
||||
|
||||
@ -434,7 +441,7 @@ EBS
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What EC2 RI types are there?</summary><br><b>
|
||||
<summary>What EC2 reserved instance types are there?</summary><br><b>
|
||||
|
||||
Standard RI - most significant discount + suited for steady-state usage
|
||||
Convertible RI - discount + change attribute of RI + suited for steady-state usage
|
||||
@ -443,6 +450,18 @@ Scheduled RI - launch within time windows you reserve
|
||||
Learn more about EC2 RI [here](https://aws.amazon.com/ec2/pricing/reserved-instances)
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>For how long can reserved instances be reserved?</summary><br><b>
|
||||
|
||||
1 or 3 years.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What allows you to control inbound and outbound instance traffic?</summary><br><b>
|
||||
|
||||
Security Groups
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What bootstrapping means and how to use it in AWS EC2?</summary><br><b>
|
||||
|
||||
@ -482,6 +501,14 @@ To terminate such instances, you must cancel the Spot instance request first.
|
||||
Set of Spot instance and if you want, also on-demand instances.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What strategies are there to allocate Spot instances?</summary><br><b>
|
||||
|
||||
* lowestPrice: launch instances from the pool that has the lowest price
|
||||
* diversified: distributed across all pools
|
||||
* capacityOptimized: optimized based on the number of instances
|
||||
</b></details>
|
||||
|
||||
#### AWS - Lambda
|
||||
|
||||
<details>
|
||||
|
9
exercises/aws/create_spot_instances.md
Normal file
9
exercises/aws/create_spot_instances.md
Normal file
@ -0,0 +1,9 @@
|
||||
## AWS EC2 - Spot Instances
|
||||
### Objectives
|
||||
|
||||
A. Create two Spot instances using a Spot Request with the following properties:
|
||||
|
||||
* Amazon Linux 2 AMI
|
||||
* 2 instances as target capacity (at any given point of time) while each one has 2 vCPUs and 3 GiB RAM
|
||||
|
||||
B. Create a single Spot instance using Amazon Linux 2 and t2.micro
|
35
exercises/aws/solutions/create_spot_instances.md
Normal file
35
exercises/aws/solutions/create_spot_instances.md
Normal file
@ -0,0 +1,35 @@
|
||||
## AWS EC2 - Spot Instances
|
||||
### Objectives
|
||||
|
||||
A. Create two Spot instances using a Spot Request with the following properties:
|
||||
|
||||
* Amazon Linux 2 AMI
|
||||
* 2 instances as target capacity (at any given point of time) while each one has 2 vCPUs and 3 GiB RAM
|
||||
|
||||
B. Create a single Spot instance using Amazon Linux 2 and t2.micro
|
||||
|
||||
### Solution
|
||||
|
||||
A. Create Spot Fleets:
|
||||
|
||||
1. Go to EC2 service
|
||||
2. Click on "Spot Requests"
|
||||
3. Click on "Request Spot Instances" button
|
||||
4. Set the following values for parameters:
|
||||
* Amazon Linux 2 AMI
|
||||
* Total target capacity -> 2
|
||||
* Check "Maintain target capacity"
|
||||
* vCPUs: 2
|
||||
* Memory: 3 GiB RAM
|
||||
5. Click on Launch
|
||||
|
||||
B. Create a single Spot instance:
|
||||
|
||||
1. Go to EC2 service
|
||||
2. Click on "Instances"
|
||||
3. Click on "Launch Instances"
|
||||
4. Choose "Amazon Linux 2 AMI" and click on "Next"
|
||||
5. Choose t2.micro and click on "Next: Configure Instance Details"
|
||||
6. Select "Request Spot instances"
|
||||
7. Set Maximum price above current price
|
||||
8. Click on "Review and Launch"
|
Reference in New Issue
Block a user