You've already forked devops-exercises
Add AWS execrises and questions
Mostly about VPC and Route 53.
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
### AWS Exercises
|
||||
|
||||
Note: Provided solutions are using the AWS console. It's recommended you'll use IaC technologies to solve the exercises (e.g. Terraform).
|
||||
Note: Provided solutions are using the AWS console. It's recommended you'll use IaC technologies to solve the exercises (e.g. Terraform).<br>
|
||||
Note 2: Some of the exercises cost money and can't be performed using the free tier/resources
|
||||
|
||||
#### AWS - IAM
|
||||
|
||||
@@ -46,6 +47,13 @@ Note: Provided solutions are using the AWS console. It's recommended you'll use
|
||||
| Auto Scaling Groups Basics | ASG | [Exercise](auto_scaling_groups_basics.md) | [Solution](solutions/auto_scaling_groups_basics.md) | Easy |
|
||||
| Dynamic Scaling Policy | ASG, Policies | [Exercise](asg_dynamic_scaling_policy.md) | [Solution](solutions/asg_dynamic_scaling_policy.md) | Easy |
|
||||
|
||||
#### AWS - VPC
|
||||
|
||||
|Name|Topic|Objective & Instructions|Solution|Comments|
|
||||
|--------|--------|------|----|----|
|
||||
| My First VPC | VPC | [Exercise](new_vpc.md) | [Solution](solutions/new_vpc.md) | Easy |
|
||||
| Subnets | VPC | [Exercise](subnets.md) | [Solution](solutions/subnets.md) | Easy |
|
||||
|
||||
#### AWS - Databases
|
||||
|
||||
|Name|Topic|Objective & Instructions|Solution|Comments|
|
||||
@@ -54,6 +62,13 @@ Note: Provided solutions are using the AWS console. It's recommended you'll use
|
||||
| Aurora DB | RDS | [Exercise](aurora_db.md) | [Solution](solutions/aurora_db.md) | Easy |
|
||||
| ElastiCache | ElastiCache | [Exercise](elasticache.md) | [Solution](solutions/elasticache.md) | Easy |
|
||||
|
||||
#### AWS - DNS
|
||||
|
||||
|Name|Topic|Objective & Instructions|Solution|Comments|
|
||||
|--------|--------|------|----|----|
|
||||
Register Domain | Route 53 | [Exercise](register_domain.md) | [Solution](solutions/register_domain.md) | Easy |
|
||||
Creating Records | Route 53 | [Exercise](creating_records.md) | [Solution](solutions/creating_records.md) | Easy |
|
||||
|
||||
#### AWS - Lambda
|
||||
|
||||
|Name|Topic|Objective & Instructions|Solution|Comments|
|
||||
@@ -1638,6 +1653,12 @@ For example:
|
||||
Note: The token has a lifetime of 15 minutes
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? In case of RDS (not Aurora), read replicas require you to change the SQL connection string</summary><br><b>
|
||||
|
||||
True. Since read replicas add endpoints, each with its own DNS name, you need to modify your app to reference these new endpoints to balance the load read.
|
||||
</b></details>
|
||||
|
||||
##### AWS Databases - Aurora
|
||||
|
||||
<details>
|
||||
@@ -1812,9 +1833,7 @@ Learn more [here](https://aws.amazon.com/documentdb)
|
||||
EBS
|
||||
</b></details>
|
||||
|
||||
#### AWS - Networking
|
||||
|
||||
##### AWS Network - VPC
|
||||
#### AWS - VPC
|
||||
|
||||
<details>
|
||||
<summary>What is VPC?</summary><br><b>
|
||||
@@ -1823,23 +1842,69 @@ EBS
|
||||
Read more about it [here](https://aws.amazon.com/vpc).
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? By default, any new account has a default VPC</summary><br><b>
|
||||
|
||||
True
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? Default VPC doesn't have internet connectivity and any launched EC2 will only have a private IP assigned</summary><br><b>
|
||||
|
||||
False. The default VPC has internet connectivity and any launched EC2 instance gets a public IPv4 address.
|
||||
|
||||
In addition, any launched EC2 instance gets a public and private DNS names.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? VPC spans multiple regions</summary><br><b>
|
||||
|
||||
False
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? It's possible to have multiple VPCs in one region</summary><br><b>
|
||||
|
||||
True. As of today, the soft limit is 5.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? Subnets belong to the same VPC, can be in different availability zones</summary><br><b>
|
||||
|
||||
True. Just to clarify, a single subnet resides entirely in one AZ.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>You have noticed your VPC's subnets (which use x.x.x.x/20 CIDR) have 4096 available IP addresses although this CIDR should have 4096 addresses. What is the reason for that?</summary><br><b>
|
||||
|
||||
AWS reserves 5 IP addresses in each subnet - first 4 and the last one, and so they aren't available for use.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What AWS uses the 5 reserved IP addresses for?</summary><br><b>
|
||||
|
||||
x.x.x.0 - network address
|
||||
x.x.x.1 - VPC router
|
||||
x.x.x.2 - DNS mapping
|
||||
x.x.x.3 - future use
|
||||
x.x.x.255 - broadcast address
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What is an Internet Gateway?</summary><br><b>
|
||||
|
||||
"component that allows communication between instances in your VPC and the internet" (AWS docs).
|
||||
Read more about it [here](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html)
|
||||
[AWS Docs](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html): "component that allows communication between instances in your VPC and the internet"
|
||||
|
||||
In addition it's good to know that IGW is:
|
||||
* Highly available and redundant
|
||||
* Not porivding internet access by its own (you need route tables to be edited)
|
||||
* Created separately from VPC
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? One or more VPCs can be attached to one Internet Gateway</summary><br><b>
|
||||
|
||||
False. Only one VPC can be attached to one IGW and vice versa
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
@@ -1866,6 +1931,10 @@ False. Only one internet gateway can be attached to a single VPC.
|
||||
Use Elastic IP which provides you a fixed IP address.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>When creating a new VPC, there is an option called "Tenancy". What is it used for?</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What is an Elastic IP address?</summary><br><b>
|
||||
|
||||
@@ -1917,6 +1986,14 @@ Allows you to connect your corporate network to AWS network.
|
||||
Elastic IP
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Kratos, your colleague, decided to use a subnet of /27 because he needs 29 IP addresses for EC2 instances. Is Kratos right?</summary><br><b>
|
||||
|
||||
No. Since AWS reserves 5 IP addresses for every subnet, Kratos will have 32-5=27 addresses and this is less than what he needs (29).
|
||||
|
||||
It's better if Kratos uses a subnet of size /26 but good luck telling him that.
|
||||
</b></details>
|
||||
|
||||
##### AWS EC2 - ENI
|
||||
|
||||
<details>
|
||||
@@ -2187,12 +2264,6 @@ ElastiCache
|
||||
Amazon S3 Transfer Acceleration
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Which service would you use for distributing incoming requests across multiple?</summary><br><b>
|
||||
|
||||
Route 53
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Which services are involved in getting a custom string (based on the input) when inserting a URL in the browser?</summary><br><b>
|
||||
|
||||
@@ -2206,18 +2277,95 @@ API Gateway - to define the URL trigger (= when you insert the URL, the function
|
||||
Kinesis
|
||||
</b></details>
|
||||
|
||||
#### AWS DNS
|
||||
#### AWS - DNS (Route 53)
|
||||
|
||||
<details>
|
||||
<summary>What is Route 53?</summary><br><b>
|
||||
|
||||
"Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service..."
|
||||
[AWS Route 53](https://aws.amazon.com/route53): "Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service..."
|
||||
|
||||
Some of Route 53 features:
|
||||
* Register domain
|
||||
* Register domains
|
||||
* DNS service - domain name translations
|
||||
* Health checks - verify your app is available
|
||||
* Not a feature but its SLA is 100% availability
|
||||
</b></details>
|
||||
|
||||
More on Route 53 [here](https://aws.amazon.com/route53)
|
||||
<details>
|
||||
<summary>What it means that "Route 53 is an Authoritative DNS"?</summary><br><b>
|
||||
|
||||
The customer can update DNS records
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What each Route 53 record contains?</summary><br><b>
|
||||
|
||||
* Domain/subdomain name (e.g. blipblop.com)
|
||||
* Value (e.g. 201.7.202.2)
|
||||
* Record type (e.g. A, AAAA, MX)
|
||||
* TTL: amount of time the record is going to be cached
|
||||
* Routing Policy: how to respond to queries
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What DNS record types does Route 53 supports?</summary><br><b>
|
||||
|
||||
* A
|
||||
* AAAA
|
||||
* CNAME
|
||||
* NS
|
||||
* DS
|
||||
* CAA
|
||||
* SOA
|
||||
* MX
|
||||
* TXT
|
||||
* SPF
|
||||
* SRV
|
||||
* NAPTR
|
||||
* PTR
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What are hosted zones?</summary><br><b>
|
||||
|
||||
A container that includes records for defining how to route traffic from a domain and its subdomains
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What types of hosted zones are there?</summary><br><b>
|
||||
|
||||
* Public Hosted Zones - include records to specify how to route traffic on the internet
|
||||
* Private Hosted Zones - contain records that specify how you traffic within VPC(s)
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What is the difference between CNAME record and an Alias record?</summary><br><b>
|
||||
|
||||
CNAME is used for mapping one hostname to any other hostname while Alias is used to map an hostname to an AWS resource.
|
||||
|
||||
In addition, Alias work for both root domain (somedomain.com) and non-root domain, while CNAME works only with non-root domain (foo.somedomain.com)
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? Alias record can be set up for an EC2 DNS name</summary><br><b>
|
||||
|
||||
False
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? Alias record can be set up for an VPC interface endpoint</summary><br><b>
|
||||
|
||||
True
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? Alias record is only of type A or AAAA</summary><br><b>
|
||||
|
||||
True
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What is a routing policy in regards to AWS Route 53?</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
#### AWS Monitoring & Logging
|
||||
|
||||
14
exercises/aws/creating_records.md
Normal file
14
exercises/aws/creating_records.md
Normal file
@@ -0,0 +1,14 @@
|
||||
## AWS Route 53 - Creating Records
|
||||
|
||||
### Requirements
|
||||
|
||||
At least one registered domain
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Create the following record for your domain:
|
||||
1. Record name: foo
|
||||
2. Record type: A
|
||||
3. Set some IP in the value field
|
||||
|
||||
2. Verify from the shell that you are able to use the record you've created to lookup for the IP address by using the domain name
|
||||
6
exercises/aws/new_vpc.md
Normal file
6
exercises/aws/new_vpc.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## AWS VPC - My First VPC
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Create a new VPC
|
||||
1. It should have a CIDR that supports using at least 60,000 hosts
|
||||
9
exercises/aws/register_domain.md
Normal file
9
exercises/aws/register_domain.md
Normal file
@@ -0,0 +1,9 @@
|
||||
## AWS Route 53 - Register Domain
|
||||
|
||||
### Objectives
|
||||
|
||||
Note: registering domain costs money. Don't do this exercise, unless you understand that you are going to register a domain and it's going to cost you money.
|
||||
|
||||
1. Register your own custom domain using AWS Route 53
|
||||
2. What is the type of your domain?
|
||||
3. How many records your domain has?
|
||||
26
exercises/aws/solutions/creating_records.md
Normal file
26
exercises/aws/solutions/creating_records.md
Normal file
@@ -0,0 +1,26 @@
|
||||
## AWS Route 53 - Creating Records
|
||||
|
||||
### Requirements
|
||||
|
||||
At least one registered domain
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Create the following record for your domain:
|
||||
1. Record name: foo
|
||||
2. Record type: A
|
||||
3. Set some IP in the value field
|
||||
|
||||
2. Verify from the shell that you are able to use the record you've created to lookup for the IP address by using the domain name
|
||||
|
||||
### Solution
|
||||
|
||||
1. Go to Route 53 service -> Hosted zones
|
||||
2. Click on your domain name
|
||||
3. Click on "Create record"
|
||||
4. Insert "foo" in "Record name"
|
||||
5. Set "Record type" to A
|
||||
6. In "Value" insert "201.7.20.22"
|
||||
7. Click on "Create records"
|
||||
|
||||
1. In your shell, type `nslookup foo.<YOUR DOMAIN>` or `dig foo.<YOUR NAME`
|
||||
17
exercises/aws/solutions/new_vpc.md
Normal file
17
exercises/aws/solutions/new_vpc.md
Normal file
@@ -0,0 +1,17 @@
|
||||
## AWS VPC - My First VPC
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Create a new VPC
|
||||
1. It should have a CIDR that supports using at least 60,000 hosts
|
||||
|
||||
### Solution
|
||||
|
||||
#### Console
|
||||
|
||||
1. Under "Virtual Private Cloud" click on "Your VPCs"
|
||||
2. Click on "Create VPC"
|
||||
3. Insert a name (e.g. someVPC)
|
||||
4. Insert IPv4 CIDR block: 10.0.0.0/16
|
||||
5. Keep "Tenancy" at Default
|
||||
6. Click on "Create VPC"
|
||||
27
exercises/aws/solutions/register_domain.md
Normal file
27
exercises/aws/solutions/register_domain.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## AWS Route 53 - Register Domain
|
||||
|
||||
### Objectives
|
||||
|
||||
Note: registering domain costs money. Don't do this exercise, unless you understand that you are going to register a domain and it's going to cost you money.
|
||||
|
||||
1. Register your own custom domain using AWS Route 53
|
||||
2. What is the type of your domain?
|
||||
3. How many records your domain has?
|
||||
|
||||
### Solution
|
||||
|
||||
1. Go to Route 53 service page
|
||||
2. Click in the menu on "Registered Domains" under "Domains"
|
||||
3. Click on "Register Domain"
|
||||
4. Insert your domain
|
||||
5. Check if it's available. If it is, add it to the cart
|
||||
|
||||
Note: registering domain costs money. Don't click on "continue", unless you understand that you are going to register a domain and it's going to cost you money.
|
||||
|
||||
6. Click on "Continue" and fill in your contact information
|
||||
7. Choose if you want to renew it in the future automatically. Accept the terms and click on "Complete Order"
|
||||
8. Go to hosted zones and you should see there your newly registered domain
|
||||
|
||||
1. The domain type is "Public"
|
||||
|
||||
1. The domain has 2 DNS records: NS and SOA
|
||||
39
exercises/aws/solutions/subnets.md
Normal file
39
exercises/aws/solutions/subnets.md
Normal file
@@ -0,0 +1,39 @@
|
||||
## AWS VPC - Subnets
|
||||
|
||||
### Requirements
|
||||
|
||||
Single newly created VPC
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Create a subnet in your newly created VPC
|
||||
1. CIDR: 10.0.0.0/24
|
||||
2. Name: NewSubnet1
|
||||
2. Create additional subnet
|
||||
1. CIDR: 10.0.1.0/24
|
||||
2. Name: NewSubnet2
|
||||
3. Different AZ compared to previous subnet
|
||||
3. Create additional subnet
|
||||
1. CIDR: 10.0.2.0/24
|
||||
2. Name: NewSubnet3
|
||||
3. Different AZ compared to previous subnets
|
||||
|
||||
### Solution
|
||||
|
||||
#### Console
|
||||
|
||||
1. Click on "Subnets" under "Virtual Private Cloud"
|
||||
2. Make sure you filter by your newly created VPC (to not see the subnets in all other VPCs). You can do this in the left side menu
|
||||
3. Click on "Create subnet"
|
||||
4. Choose your newly created VPC
|
||||
5. Set the subnet name to "NewSubnet1"
|
||||
6. Choose AZ
|
||||
7. Set CIDR to 10.0.0.0/24
|
||||
8. Click on "Add new subnet"
|
||||
9. Set the subnet name to "NewSubnet2"
|
||||
10. Choose a different AZ
|
||||
11. Set CIDR to 10.0.1.0/24
|
||||
12. Click on "Add new subnet"
|
||||
13. Set the subnet name to "NewSubnet3"
|
||||
14. Choose a different AZ
|
||||
15. Set CIDR to 10.0.2.0/24
|
||||
19
exercises/aws/subnets.md
Normal file
19
exercises/aws/subnets.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## AWS VPC - Subnets
|
||||
|
||||
### Requirements
|
||||
|
||||
Single newly created VPC
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Create a subnet in your newly created VPC
|
||||
1. CIDR: 10.0.0.0/24
|
||||
2. Name: NewSubnet1
|
||||
2. Create additional subnet
|
||||
1. CIDR: 10.0.1.0/24
|
||||
2. Name: NewSubnet2
|
||||
3. Different AZ compared to previous subnet
|
||||
3. Create additional subnet
|
||||
1. CIDR: 10.0.2.0/24
|
||||
2. Name: NewSubnet3
|
||||
3. Different AZ compared to previous subnets
|
||||
Reference in New Issue
Block a user