Create VPC and Core Components(IGW, Route table, Subnets)
- IPv4 CIDR
- 10.0.0.0 is commonly chosen one.
- this is saying how many IP addresses you want to allocate.
- IPv6 CIDR block
- it’s supported on AWS.
- it’s the future of our IP protocol.
- so it’s definitely something you might want to turn on.
- just be prepared for the future there
- Tenancy
- dedicated host is quite expensive
- we don’t have any DNS hostnames
- we definitely want to turn that on.
- if we launch EC2 instance, it’s not going to get a DNS hostname, that’s just like a URL.
Create internet gateways
- internet gateways can only be attached to a very specific VPC
- it’s a one-to-one relationship
- but that still doesn’t mean that things within our network can reach the internet
- because we have to add a route to our route table
- see that there already is a route table associated with our VPC
- because it did create us a default route table
- But let’s create a route table
You can see by default, it has the full scope of our local network here.
- Let change this one to our main.
- main route table is whenever what is going to be used by default.
- we’re gonna add a route for the internet gateway.
- 0.0.0.0/0 which means let’s take anything from anywhere.
- select internet gateway
- save
- now we have a way for our subnets to reach the internet.
- it’s time to create some subnets.
- these are default ones created with your default VPC
- there’s exactly one for every availability zone within each region
- my region is seoul, which has 4 public subnets.
- check the auto assign to Yes
- if this is set to Yes, that means any EC2 instance launch in the subnet is going to get a public IP address.
- Hence, it’s going to be considered a public subnet.
- a lot of companies wants to run on at least three availability zones for high availability.
- because one goes out, if you have another one, what happens if two goes out.
- so commonly create at least two additionals.
- we’re gonna make 3 subnets and 1 private subnet
first of all, make subnet for A.
- this CIDR range is smaller than the one up here.
- the number is larger, but from the perspective of how many IP addresses it allocates, there’s actually a fewer here.
- you can set this as 16, it’s always goint to be less, I mean a higher number than 16.
- the auto sign is going to be set to No.
- modify this and set it is considered a public subnet.
make subnets for B and C and private A too.
- public A, B, C are already automatically asscociated with main route table by default.
- but for our private one, we’re not gonna wanting to really use the main route table there.
- so we probably would want to
create our own route table for our private subnets</b>.
- so we probably would want to
- we don’t need the subnet to reach the internet.
- so just change the association here.
Words
- on the left hand side : 왼쪽에
The copyright of all material here is on this video https://www.youtube.com/watch?v=Ia-UEYYR44s
This post is just for studying AWS SAA.
Comments powered by Disqus.