Skip to content

Commit 52e27c3

Browse files
committed
IntoTheDevOps: Add End-to-End AWS content
Signed-off-by: NotHarshhaa <reddyharshhaa12@gmail.com>
1 parent a02677f commit 52e27c3

File tree

91 files changed

+5524
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+5524
-0
lines changed

topics/aws/README.md

Lines changed: 3498 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## AWS IAM - Access Advisor
2+
3+
### Objectives
4+
5+
Go to the Access Advisor and answer the following questions regarding one of the users:
6+
7+
1. Are there services this user never accessed?
8+
2. What was the last service the user has accessed?
9+
3. What the Access Advisor is used/good for?
10+
11+
## Solution
12+
13+
Click [here to view to solution](solution.md)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## AWS IAM - Access Advisor
2+
3+
### Objectives
4+
5+
Go to the Access Advisor and answer the following questions regarding one of the users:
6+
7+
1. Are there services this user never accessed?
8+
2. What was the last service the user has accessed?
9+
3. What the Access Advisor is used/good for?
10+
11+
### Solution
12+
13+
1. Go to AWS IAM service and click on "Users" under "Access Management"
14+
2. Click on one of the users
15+
3. Click on the "Access Advisor" tab
16+
4. Check which service was last accessed and which was never accessed
17+
18+
Access Advisor can be good to evaluate whether there are services the user is not accessing (as in never or not frequently). This can be help in deciding whether some permissions should be revoked or modified.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## AWS ELB - ALB Multiple Target Groups
2+
3+
### Requirements
4+
5+
Two EC2 instances with a simple web application that shows the web page with the string "Hey, it's a me, `<HOSTNAME>`!"
6+
One EC2 instance with a simple web application that shows the web page with the string "Hey, it's only a test..." under the endpoint /test
7+
8+
### Objectives
9+
10+
1. Create an application load balancer for the two instances you have, with the following properties
11+
1. healthy threshold: 3
12+
2. unhealthy threshold: 3
13+
3. interval: 10 seconds
14+
2. Create another target group for the third instance
15+
1. Traffic should be forwarded to this group based on the "/test" path
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## AWS ELB - ALB Multiple Target Groups
2+
3+
### Requirements
4+
5+
Two EC2 instances with a simple web application that shows the web page with the string "Hey, it's a me, `<HOSTNAME>`!"
6+
One EC2 instance with a simple web application that shows the web page with the string "Hey, it's only a test..." under the endpoint /test
7+
8+
### Objectives
9+
10+
1. Create an application load balancer for the two instances you have, with the following properties
11+
1. healthy threshold: 3
12+
2. unhealthy threshold: 3
13+
3. interval: 10 seconds
14+
2. Create another target group for the third instance
15+
1. Traffic should be forwarded to this group based on the "/test" path
16+
17+
### Solution
18+
19+
#### Console
20+
21+
1. Go to EC2 service
22+
2. Click in the left side menu on "Load balancers" under "Load balancing"
23+
3. Click on "Create load balancer"
24+
4. Choose "Application Load Balancer"
25+
5. Insert a name for the LB
26+
6. Choose an AZ where you want the LB to operate
27+
7. Choose a security group
28+
8. Under "Listeners and routing" click on "Create target group" and choose "Instances"
29+
1. Provide a name for the target group
30+
2. Set healthy threshold to 3
31+
3. Set unhealthy threshold to 3
32+
4. Set interval to 10 seconds
33+
5. Click on "Next" and choose two out of three instances you've created
34+
6. Click on "Create target group"
35+
9. Refresh target groups and choose the one you've just created
36+
10. Click on "Create load balancer" and wait for it to be provisioned
37+
38+
11. In the left side menu click on "Target Groups" under "Load Balancing"
39+
12. Click on "Create target group"
40+
13. Set it with the same properties as previous target group but this time, add the third instance that you didn't include in the previous target group
41+
14. Go back to your ALB and under "Listeners" click on "Edit rules" under your current listener
42+
1. Add a rule where if the path is "/test" then traffic should be forwarded to the second target group you've created
43+
2. Click on "Save"
44+
15. Test it by going to the browser, insert the address and add "/test" to the address
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## AWS ELB - Application Load Balancer
2+
3+
### Requirements
4+
5+
Two EC2 instances with a simple web application that shows the web page with the string "Hey, it's a me, `<HOSTNAME>`!"
6+
7+
### Objectives
8+
9+
1. Create an application load balancer for the two instances you have, with the following properties
10+
1. healthy threshold: 3
11+
2. unhealthy threshold: 3
12+
3. interval: 10 seconds
13+
2. Verify load balancer is working (= you get reply from both instances at different times)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## AWS ELB - Application Load Balancer
2+
3+
### Requirements
4+
5+
Two EC2 instances with a simple web application that shows the web page with the string "Hey, it's a me, `<HOSTNAME>`!"
6+
7+
### Objectives
8+
9+
1. Create an application load balancer for the two instances you have, with the following properties
10+
1. healthy threshold: 3
11+
2. unhealthy threshold: 3
12+
3. interval: 10 seconds
13+
2. Verify load balancer is working (= you get reply from both instances at different times)
14+
15+
### Solution
16+
17+
#### Console
18+
19+
1. Go to EC2 service
20+
2. Click in the left side menu on "Load balancers" under "Load balancing"
21+
3. Click on "Create load balancer"
22+
4. Choose "Application Load Balancer"
23+
5. Insert a name for the LB
24+
6. Choose an AZ where you want the LB to operate
25+
7. Choose a security group
26+
8. Under "Listeners and routing" click on "Create target group" and choose "Instances"
27+
1. Provide a name for the target group
28+
2. Set healthy threshold to 3
29+
3. Set unhealthy threshold to 3
30+
4. Set interval to 10 seconds
31+
5. Click on "Next" and choose the two of the instances you've created
32+
6. Click on "Create target group"
33+
9. Refresh target groups and choose the one you've just created
34+
10. Click on "Create load balancer" and wait for it to be provisioned
35+
11. Copy DNS address and paste it in the browser. If you refresh, you should see different message based on the instance where the traffic was routed to
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## AWS Auto Scaling Groups - Dynamic Scaling Policy
2+
3+
### Requirements
4+
5+
1. Existing Auto Scaling Group with maximum capacity set to at least 3
6+
2. One running EC2 instance with max of 4 CPUs
7+
8+
### Objectives
9+
10+
1. Create a dynamic scaling policy with the following properties
11+
1. Track average CPU utilization
12+
2. Target value should be 70%
13+
2. Increase the CPU utilization to at least 70%
14+
1. Do you see change in number of instances?
15+
1. Decrease CPU utilization to less than 70%
16+
1. Do you see change in number of instances?
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## AWS Auto Scaling Groups - Dynamic Scaling Policy
2+
3+
### Requirements
4+
5+
1. Existing Auto Scaling Group with maximum capacity set to at least 3
6+
2. One running EC2 instance with max of 4 CPUs
7+
8+
### Objectives
9+
10+
1. Create a dynamic scaling policy with the following properties
11+
1. Track average CPU utilization
12+
2. Target value should be 70%
13+
2. Increase the CPU utilization to at least 70%
14+
1. Do you see change in number of instances?
15+
1. Decrease CPU utilization to less than 70%
16+
1. Do you see change in number of instances?
17+
18+
### Solution
19+
20+
#### Console
21+
22+
1. Go to EC2 service -> Auto Scaling Groups and click on the tab "Automating scaling"
23+
2. Choose "Target tracking scaling" under "Policy Type"
24+
3. Set metric type to Average CPU utilization
25+
4. Set target value to 70% and click on "Create"
26+
27+
1. If you are using Amazon Linux 2, you can stress the instance with the following:
28+
29+
```
30+
sudo amazon-linux-extras install epel -y
31+
sudo yum install stress -y
32+
stress -c 4 # assuming you have 4 CPUs
33+
```
34+
2. Yes, additional EC2 instance was added
35+
36+
1. Simply stop the stress command
37+
2. Yes, one of the EC2 instances was terminated
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## AWS Databases - Aurora DB
2+
3+
### Objectives
4+
5+
1. Create an Aurora database with the following properties
6+
* Edition: MySQL
7+
* Instance type: db.t3.small
8+
* A reader node in a different AZ
9+
* Public access should be enabled
10+
* Port should be set to 3306
11+
* DB name: 'db'
12+
* Backup retention: 10 days
13+
14+
2. How many instances does your DB cluster has?

0 commit comments

Comments
 (0)