ProSheet 05 of 7
The rest of this sheet is locked4 Pro sheets unlock together, across every toolEveryPro sheet, every toolLifetimeone payment, no renewalNewsheets included as they shipOne-time payment · lifetime access
Networking & Content Delivery
A comprehensive developer cheatsheet covering AWS networking and content delivery services, featuring essential CLI commands and operational workflows for VPC, Route 53, CloudFront, API Gateway, Direct Connect, and VPN.
VPC — Virtual Private Cloud
VPC is a logically isolated section of the AWS cloud.
VPC Management
List VPCs:
bash
$ aws ec2 describe-vpcs --query 'Vpcs[*].[VpcId,CidrBlock,IsDefault,State,Tags[?Key==`Name`].Value]' --output table
|------------------|---------------|-----------|----------|------------------|
| vpc-12345678 | 10.0.0.0/16 | False | available | my-vpc |
| vpc-87654321 | 172.31.0.0/16 | True | available | default |Create VPC:
bash
$ aws ec2 create-vpc --cidr-block 10.0.0.0/16 --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=my-vpc}]'
{
"Vpc": {
"VpcId": "vpc-abcdef1234567890",
"CidrBlock": "10.0.0.0/16",
"State": "pending"
}
}Enable DNS Hostnames (for public DNS resolution):
bash
$ aws ec2 modify-vpc-attribute --vpc-id vpc-abcdef1234567890 --enable-dns-hostnames '{"Value":true}'Enable DNS Support:
bash
$ aws ec2 modify-vpc-attribute --vpc-id vpc-abcdef1234567890 --enable-dns-support '{"Value":true}'Delete VPC:
bash
$ aws ec2 delete-vpc --vpc-id vpc-abcdef1234567890** VPC must be empty (no subnets, gateways, etc.) before deletion.**
Subnets
List Subnets in a VPC:
bash
$ aws ec2 describe-subnets --filter Name=vpc-id,Values=vpc-12345678 --query 'Subnets[*].[SubnetId,CidrBlock,AvailabilityZone,MapPublicIpOnLaunch]' --output table
|------------------|---------------|------------------|---------------------|
| subnet-1234 | 10.0.1.0/24 | us-east-1a | True |
| subnet-5678 | 10.0.2.0/24 | us-east-1b | False |