AWS SAA Study Notes 1
IP
- Every device connected to a network is assigned an IP address.
- IPv4 is generally used.
- If an IP address is 172.31.0.0/16...
- The first two blocks are the network part.
- The last two blocks are the host part (which tells you the servers reachable inside the network).
- After the slash is the "subnet mask." It means the first two blocks (8+8) are the network part.
- If an IP address is 0.0.0.0/0, it means "the entire network."
- Used when working with an internet gateway.
- Security groups and network ACLs are firewalls.
- Router: the navigation for finding your way to an IP address. It finds the optimal route.
- Routing table: the map data. It says which endpoints to route through.
VPC
- A VPC generally uses private IP addresses.
- Because if they overlap with external public IPs, communication is impossible.
- The CIDR must also not overlap with the network you connect to.
- A VPC alone cannot create an EC2 instance. You have to create a subnet inside it.
- A subnet can only be created in a single AZ.
- You create a routing table in the VPC and assign it per subnet.
VPC to internet
- By default you cannot communicate outside the VPC. (Put differently, inside is fine.)
- A subnet with an internet gateway attached is a public subnet.
- A bare subnet without one is a private subnet.
- A NAT gateway is the one-directional version of an internet gateway.
- How to connect to the internet
- Subnet: internet gateway
- EC2: IP (there are public IPs and Elastic IPs. A public IP is free but changes every time. An Elastic IP is a dedicated IP that is yours alone.)
VPC to other AWS services
- Use VPC peering or Transit Gateway.
- This goes over the internet.
- CIDRs must not overlap.
- Use a gateway endpoint (S3, DynamoDB) or an interface endpoint.
- This uses a private network rather than the internet.
VPC to on-premises
- Site-to-Site VPN
- A method using private IP addresses. (Because it is a private "IP," it uses the internet.)
- You install a router device on-premises.
- A comparable service is Client VPN. That one is for one-off use.
- Direct Connect
- Connect over a dedicated line.
- Can also connect an AWS service to on-premises this way.
Network ACL
- Set on a subnet.
- Security groups are set on EC2.
- Can set both allow and deny.
- Security groups deny by default and can only allow.
- Stateless (does not store information).
- Security groups are stateful (store information).
Route 53
- Types of routing
- Simple routing
- Weighted routing
- Geolocation routing
- Latency routing
- Failover routing
- Multivalue answer routing (random)
CloudFront
- Runs at the edge.
- Good for availability, security, and speed.
- Origin
- Anything can be set as the origin.
- Among AWS services, you can use S3 and ELB.