Add a couple of AWS exercises

Questions as well :)
This commit is contained in:
abregman
2021-11-13 20:57:18 +02:00
parent 8b0360e13c
commit f7edd72302
8 changed files with 249 additions and 8 deletions

View File

@ -0,0 +1,28 @@
## AWS EC2 - Elastic IP
### Requirements
* An EC2 instance with public IP (not elastic IP)
### Objectives
1. Write down the public IP of your EC2 instance somewhere and stop & start the instance. Does the public IP address is the same? why?
2. Handle this situation so you have the same public IP even after stopping and starting the instance
### Solution
1. Go to EC2 service -> Instances
1. Write down current public IP address
2. Click on "Instance state" -> Stop instance -> Stop
3. Click on "Instance state" -> Start Instance
4. Yes, the public IP address has changed
2. Let's use an Elastic IP address
1. In EC2 service, under "Network & Security" click on "Elastic IP"
2. Click on the "Allocate elastic IP address" button
3. Make sure you select "Amazon's pool of IPv4 addresses" and click on "Allocate"
4. Click on "Actions" and then "Associate Elastic IP address"
1. Select "instance", choose your instance and provide its private IP address
2. Click on "Associate"
5. Now, if we go back to the instance page, we can see it is using the Elastic IP address as its public IP
Note: to remove it, use "disassociate" option and don't forget to also release it so you won't be billed.

View File

@ -0,0 +1,25 @@
## AWS EC2 - Elastic Network Interfaces
### Requirements
* An EC2 instance with network interface
### Objectives
A. Create a network interface and attach it to the EC2 instance that already has one network interface
B. Explain why would anyone use two network interfaces
### Solution
A.
1. Go to EC2 service
2. Click on "Network Interfaces" under "Network & Security"
3. Click on "Create network interface"
4. Provide a description
5. Choose a subnet (one that is in the AZ as the instance)
6. Optionally attach a security group and click on "Create network interface"
7. Click on "Actions" -> "Attach" and choose the instance to attach it to
8. If you go now to "Instances" page you'll see your instance has two network interfaces
B.
1. You can move the second network interface between instances. This allows us to create kind of a failover mechanism between the instances.

View File

@ -0,0 +1,23 @@
## AWS EC2 - Placement Groups
### Objectives
A. Create a placement group. It should be one with a low latency network. Make sure to launch an instance as part of this placement group.
B. Create another placement group. This time high availability is a priority
### Solution
A.
1. Go to EC2 service
2. Click on "Placement Groups" under "Network & Security"
3. Click on "Create placement group"
4. Give it a name and choose the "Cluster" placement strategy because the requirement is low latency network
5. Click on "Create group"
6. Go to "Instances" and click on "Launch an instance". Choose any properties you would like, just make sure to check "Add instance to placement group" and choose the placement group you've created
B.
1. Go to EC2 service
2. Click on "Placement Groups" under "Network & Security"
3. Click on "Create placement group"
4. Give it a name and choose the "Spread" placement strategy because the requirement is high availability as top priority
5. Click on "Create group"