Add a couple of AWS questions
This commit is contained in:
33
exercises/aws/solutions/health_checks.md
Normal file
33
exercises/aws/solutions/health_checks.md
Normal file
@@ -0,0 +1,33 @@
|
||||
## AWS Route 53 - Health Checks
|
||||
|
||||
## Requirements
|
||||
|
||||
3 web instances in different AZs.
|
||||
|
||||
## Objectives
|
||||
|
||||
1. For each instance create a health checks with the following properties:
|
||||
1. Name it after the AZ where the instance resides
|
||||
2. Failure threshold should be 5
|
||||
|
||||
2. Edit the security group of one of your instances and remove HTTP rules.
|
||||
1. Did it change the status of the health check?
|
||||
|
||||
### Solution
|
||||
|
||||
#### Console
|
||||
|
||||
1. Go to Route 53
|
||||
2. Click on "Health Checks" in the left-side menu
|
||||
3. Click on "Create health check"
|
||||
4. Insert the name: us-east-2
|
||||
5. What to monitor: endpoint
|
||||
6. Insert the IP address of the instance
|
||||
7. Insert the endpoint /health if your web instance supports that endpoint
|
||||
8. In advanced configuration, set Failure threshold to 5
|
||||
9. Click on "next" and then on "Create health check"
|
||||
10. Repeat steps 1-9 for the other two instances you have
|
||||
|
||||
1. Go to security group of one of your instances
|
||||
2. Click on "Actions" -> Edit inbound rules -> Delete HTTP based rules
|
||||
3. Go back to health checks page and after a couple of seconds you should see that the status becomes "unhealthy"
|
29
exercises/aws/solutions/route_53_failover.md
Normal file
29
exercises/aws/solutions/route_53_failover.md
Normal file
@@ -0,0 +1,29 @@
|
||||
## AWS Route 53 - Failover
|
||||
|
||||
### Requirements
|
||||
|
||||
A running EC2 web instance with an health check defined for it in Route 53
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Create a failover record that will failover to another record if an health check isn't passing
|
||||
1. Make sure TTL is 30
|
||||
2. Associate the failover record with the health check you have
|
||||
|
||||
### Solution
|
||||
|
||||
#### Console
|
||||
|
||||
1. Go to Route 53 service
|
||||
2. Click on "Hosted Zones" in the left-side menu
|
||||
3. Click on your hosted zone
|
||||
4. Click on "Created record"
|
||||
5. Insert "failover" in record name and set record type to A
|
||||
6. Insert the IP of your instance
|
||||
7. Set the routing policy to failover
|
||||
8. Set TTL to 30
|
||||
9. Associate with an health check
|
||||
10. Add another record with the same properties as the previous one
|
||||
11. Click on "Create records"
|
||||
12. Go to your EC2 instance and edit its security group to remove the HTTP rules
|
||||
13. Use your web app and if you print the hotsname of your instance then you will notice, a failover was performed and a different EC2 instance is used
|
Reference in New Issue
Block a user