VPC Network Deployer
Mindset
One-line takeaway: a production VPC is not "a /16 with subnets" — it is
a routing graph where every route-table entry, every security-group
rule, and every NACL rule is an explicit security decision. The CIDR block
is the least interesting part; the subnet tiering, NAT topology, and
endpoint strategy determine blast radius, cost, and failover behavior.
Three facts make VPC provisioning different from "draw a network diagram":
Mindset — three facts that make VPC provisioning different — moved verbatim.
Full detail: Advanced Patterns.
Quick reference — deployment checklist
| Dimension |
Requirement |
Step |
| CIDR block |
RFC 1918, no overlap with existing VPCs/on-prem, /16 minimum for production |
Step 1 |
| Subnet tiers |
Public, private, and database tiers across N AZs (N ≥ 2, recommend 3) |
Step 2 |
| Internet Gateway |
Attached for public subnet egress |
Step 3 |
| NAT Gateway |
1 per AZ (HA) or 1 in AZ-a (cost-optimized) |
Step 4 |
| Route tables |
Public→IGW, private→NAT (AZ-local), database→local-only |
Step 5 |
| Security Groups |
Least-privilege, reference by SG name/ID, not CIDR |
Step 6 |
| NACLs |
Stateless defense-in-depth for known IP ranges |
Step 7 |
| VPC Flow Logs |
All-traffic, S3 or CloudWatch, 1-year retention |
Step 8 |
| VPC Endpoints |
Gateway (S3, DynamoDB — free) + Interface for private services |
Step 9 |
| DNS |
enableDnsHostnames + enableDnsSupport true, DHCP option set |
Step 10 |
| IPv6 |
Dual-stack optional; Egress-Only Gateway for IPv6 egress |
Step 11 |
| Multi-VPC |
Transit Gateway for >2 VPCs; peering for 1:1 |
Step 12 |
Pre-flight: deployment specification gate (run before architecture output)
Before producing the deployment plan, validate the input specification.
Several requirements block deployment — proceeding with an invalid
spec produces a non-functional or insecure VPC.
Live-account pre-flight checks (deployment spec gate) — moved verbatim.
Full detail: Diagnostic commands.
| Attribute |
Value |
Effect on plan |
| Region |
Valid AWS region |
Determines available AZs and service endpoints |
| AZ count |
2 |
Minimum for HA. Acceptable but not ideal — single AZ failure takes 50% of capacity. |
| AZ count |
3 |
Recommended. Survives a single AZ failure with 67% capacity. Standard for production. |
| CIDR block |
/16 to /28 |
/16 (65,536 IPs) recommended for production. /20 is the practical minimum for a 3-tier, 3-AZ layout. |
| NAT strategy |
HA (1 per AZ) |
~$96/month base + data processing. Survives AZ failure. |
| NAT strategy |
Cost-optimized (1) |
~$32/month base + data processing. Single AZ failure cuts egress. |
| Endpoint budget |
None |
All traffic routes through NAT — higher cost, lower security |
| IPv6 |
Dual-stack |
Requires /56 IPv6 CIDR assigned by AWS. Egress-Only Gateway for private IPv6 egress. |
If the deployment spec is incomplete (missing region, CIDR range, or
AZ count), output:
PREREQUISITES_MISSING output example (incomplete deployment spec) — moved verbatim.
Full detail: Worked examples.
Process — Architecture planning (apply in order, produce deployment plan)
Step 0: Expert knowledge — non-obvious VPC behaviors that change the plan
These behaviors are easy to misjudge without operational VPC experience.
Each changes the architecture if ignored:
Step 0 — expert knowledge: non-obvious VPC behaviors that change the plan — moved verbatim.
Full detail: Advanced Patterns.
Step 1: CIDR planning
RFC 1918 private ranges (Step 1) — moved verbatim.
Full detail: CIDR planning guide.
CIDR allocation strategy for a /16 VPC (10.0.0.0/16):
| Tier |
AZ-a |
AZ-b |
AZ-c |
Mask |
IPs per subnet |
| Public |
10.0.0.0/20 |
10.0.16.0/20 |
10.0.32.0/20 |
/20 |
4,094 |
| Private (app) |
10.0.48.0/20 |
10.0.64.0/20 |
10.0.80.0/20 |
/20 |
4,094 |
| Database |
10.0.96.0/24 |
10.0.97.0/24 |
10.0.98.0/24 |
/24 |
254 |
| Reserved |
10.0.112.0/20 |
10.0.128.0/17 |
— |
— |
Future expansion |
Overlap-check rule: Before deploying, the CIDR range MUST be checked
against:
- Existing VPCs in the account (
describe-vpcs)
- VPCs in peered accounts (peering connections)
- On-premises CIDR ranges (Direct Connect, VPN)
- Transit Gateway-attached VPCs
- Reserved CIDR ranges for future VPCs
If ANY overlap exists → PREREQUISITES_MISSING. A non-overlapping CIDR
range is mandatory.
Sizing rationale — why /16 and /20 per tier (Step 1) — moved verbatim.
Full detail: CIDR planning guide.
Step 2: Subnet tier design
Three-tier model (recommended for production):
| Tier |
Purpose |
Route table |
Internet egress |
| Public |
ALB, NAT Gateway, Bastion |
0.0.0.0/0 → IGW |
Direct via IGW |
| Private |
Application workloads (ECS, EKS, EC2, Lambda-VPC) |
0.0.0.0/0 → NAT (AZ-local) |
NAT Gateway |
| Database |
RDS, ElastiCache, Redshift |
Local only |
No internet egress |
Why database subnets have no internet route (Step 2); Two-tier model (Step 2) — moved verbatim.
Full detail: Advanced Patterns.
One-tier model (NEVER for production):
- All resources in public subnets. No isolation. Only acceptable for
throwaway sandboxes or demos. Flag as PREREQUISITES_MISSING.
Step 3: Internet Gateway and public egress
Internet Gateway, EIGW, and deployment commands (Step 3) — moved verbatim.
Full detail: Advanced Patterns.
Step 4: NAT Gateway topology
HA topology (1 NAT Gateway per AZ):
- Each private subnet routes to its AZ-local NAT Gateway.
- Survives AZ failure without cross-AZ data charges for NAT.
- Cost: ~$32/month × N AZs = ~$96/month for 3 AZs, plus per-GB.
- Recommended for production.
Cost-optimized topology (1 NAT Gateway in AZ-a):
- All private subnets route to the single NAT Gateway in AZ-a.
- If AZ-a fails, all private egress fails.
- Cross-AZ data transfer charges apply for AZ-b/c traffic routing to AZ-a NAT.
- Cost: ~$32/month, plus per-GB + cross-AZ.
- Acceptable for dev/staging. Flag as a finding for production.
NAT Gateway deployment commands (Step 4); NAT anti-pattern — never a private subnet (Step 4) — moved verbatim.
Full detail: Advanced Patterns.
Step 5: Route table design
Public route table (one per VPC, associated with all public subnets):
| Destination |
Target |
Purpose |
| 10.0.0.0/16 |
local |
VPC-internal routing |
| 0.0.0.0/0 |
igw-xxx |
Internet egress |
| ::/0 |
igw-xxx |
IPv6 internet egress (if dual-stack) |
Private route table (one per AZ, associated with AZ's private subnet):
| Destination |
Target |
Purpose |
| 10.0.0.0/16 |
local |
VPC-internal routing |
| 0.0.0.0/0 |
nat-xxx (AZ-local) |
NAT egress via AZ-local NAT |
| ::/0 |
eigw-xxx |
IPv6 egress (Egress-Only Gateway) |
Database route table (one per AZ, associated with AZ's database subnet):
| Destination |
Target |
Purpose |
| 10.0.0.0/16 |
local |
VPC-internal routing ONLY |
Critical: The database route table has NO 0.0.0.0/0 route. This is
the defense-in-depth mechanism. Even if a database instance is compromised
and its SG is opened, the instance cannot reach the internet.
Why one private route table per AZ (Step 5) — moved verbatim.
Full detail: Advanced Patterns.
Step 6: Security Groups
Security Groups are stateful — return traffic is automatically allowed
for any allowed connection. Design principles:
- Reference by name/ID, not CIDR. Use
Source: sg-xxx instead of
Source: 10.0.1.0/24. This prevents scope creep when CIDR ranges
change.
- Least-privilege ports. Allow only the exact port needed (e.g.,
443/tcp not 0-65535/tcp).
- No
0.0.0.0/0 inbound except for public ALBs. The ALB security
group allows 443/tcp from 0.0.0.0/0; the app security group allows
8080/tcp from the ALB security group only.
- Separate SG per tier. Public SG, App SG, Database SG — never reuse
one SG across tiers.
Standard security group layout (Step 6) — moved verbatim.
Full detail: Advanced Patterns.
Step 7: Network ACLs (NACLs)
NACLs are stateless — each connection requires an explicit inbound
AND outbound rule. They are evaluated before Security Groups. Use NACLs
for:
NACL use cases and scope limits (Step 7); Standard NACL layout and ephemeral ports (Step 7) — moved verbatim.
Full detail: Advanced Patterns.
Step 8: VPC Flow Logs
VPC Flow Logs capture metadata about IP traffic to/from network interfaces
in the VPC. They are essential for:
Why VPC Flow Logs (Step 8); Flow log destination options and recommendation (Step 8); Flow logs deployment command (Step 8); Flow logs configuration requirements (Step 8) — moved verbatim.
Full detail: Advanced Patterns.
Step 9: VPC Endpoints
Gateway Endpoints (free):
| Service |
Endpoint |
Notes |
| S3 |
com.amazonaws.<region>.s3 |
Route-table-based. No per-hour/per-GB cost. Add to every route table that needs S3 access from private subnets. |
| DynamoDB |
com.amazonaws.<region>.dynamodb |
Route-table-based. Same as S3. |
Always deploy Gateway Endpoints for S3 and DynamoDB. They save NAT
Gateway data-processing costs ($0.045/GB) and improve latency. There is
no downside.
Interface Endpoints (ENI-based, ~$7/month per AZ):
Interface endpoint service table (Step 9); Interface endpoint deployment and private DNS (Step 9) — moved verbatim.
Full detail: VPC endpoint types.
Step 10: DNS resolution
DNS required VPC attributes commands (Step 10); DNS both-true requirements and DHCP option set commands (Step 10); AmazonProvidedDNS explanation (Step 10) — moved verbatim.
Full detail: Advanced Patterns.
Step 11: IPv6 dual-stack considerations
IPv6 is optional but recommended for public-facing workloads (ALB, NAT64).
IPv6 association commands (Step 11) — moved verbatim.
Full detail: Advanced Patterns.
Key differences from IPv4:
- IPv6 addresses are internet-routable by default. There is no NAT for
IPv6. Private IPv6 subnets need an Egress-Only Internet Gateway.
- Security Groups and NACLs filter IPv6 traffic independently. A rule
allowing
0.0.0.0/0 does NOT allow IPv6 — add ::/0 explicitly.
- NAT Gateway does NOT process IPv6 traffic. IPv6 egress uses EIGW.
- Route 53 Resolver supports IPv6 (AAAA records) with AmazonProvidedDNS.
Step 12: Multi-VPC connectivity
Multi-VPC connectivity options — peering vs Transit Gateway detail (Step 12) — moved verbatim.
Full detail: Advanced Patterns.
Decision rule: If you have ≤2 VPCs and no VPN/Direct Connect, use
peering. If you have ≥3 VPCs, multi-account, or need centralized routing,
use Transit Gateway. Migrating from peering to TGW later is painful —
plan for growth.
Output format (per VPC deployment plan)
VPC_SPEC: <name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
ARCHITECTURE:
Region: <region>
CIDR: <vpc-cidr> (IPv4), <ipv6-cidr> (IPv6, if dual-stack)
AZs: [<az-a>, <az-b>, <az-c>]
Tiers:
- Public: [<subnet-a>, <subnet-b>, <subnet-c>] → IGW
- Private: [<subnet-a>, <subnet-b>, <subnet-c>] → NAT (HA per-AZ)
- Database: [<subnet-a>, <subnet-b>, <subnet-c>] → local-only
NAT: <HA (3 NAT Gateways, one per AZ) | Cost-optimized (1 NAT Gateway)>
Endpoints: [Gateway: S3, DynamoDB | Interface: SecretsManager, SSM, KMS, ...]
Flow Logs: S3 destination, 1-year retention
DNS: enableDnsHostnames + enableDnsSupport, AmazonProvidedDNS
CHECKLIST:
[x] CIDR range is RFC 1918 and does not overlap with existing VPCs/on-prem
[x] Subnet tiers span 3 AZs with growth headroom (/20 per tier per AZ)
[x] Public subnets route 0.0.0.0/0 → IGW
[x] Private subnets route 0.0.0.0/0 → AZ-local NAT Gateway
[x] Database subnets have NO internet route (local-only)
[x] Security Groups reference by name/ID, least-privilege ports
[x] NACLs allow ephemeral ports for return traffic
[x] VPC Flow Logs capture ALL traffic to S3 with 1-year retention
[x] Gateway Endpoints for S3 and DynamoDB (free, no downside)
[x] Interface Endpoints for private-service connectivity
[x] DNS hostnames and support enabled
FINDINGS:
- [INFO] Gateway Endpoints for S3/DynamoDB will save ~$X/month in NAT processing
- [WARN] Cost-optimized NAT topology — AZ-a failure cuts all private egress
DEPLOY_COMMANDS:
<ordered list of aws ec2 create-* commands>
Worked example — 3-AZ HA VPC with full tiers
VPC_SPEC: prod-vpc-useast1
VERDICT: READY_TO_DEPLOY
ARCHITECTURE:
Region: us-east-1
CIDR: 10.0.0.0/16 (IPv4), 2600:1f18:xxxx::/56 (IPv6 dual-stack)
AZs: [us-east-1a, us-east-1b, us-east-1c]
Tiers:
- Public: [10.0.0.0/20, 10.0.16.0/20, 10.0.32.0/20] → IGW
- Private: [10.0.48.0/20, 10.0.64.0/20, 10.0.80.0/20] → NAT (HA per-AZ)
- Database: [10.0.96.0/24, 10.0.97.0/24, 10.0.98.0/24] → local-only
NAT: HA (3 NAT Gateways, one per AZ, ~$96/month base)
Endpoints:
- Gateway: S3, DynamoDB (free)
- Interface: SecretsManager, SSM, KMS, CloudWatch Logs, STS (~$126/month)
Flow Logs: S3 destination (arn:aws:s3:::prod-vpc-flow-logs), 1-year retention
DNS: enableDnsHostnames + enableDnsSupport, AmazonProvidedDNS
CHECKLIST:
[x] CIDR 10.0.0.0/16 is RFC 1918, no overlap with existing VPCs or on-prem
[x] Subnet tiers span 3 AZs with /20 growth headroom per tier per AZ
[x] Public subnets route 0.0.0.0/0 → igw-prod
[x] Private subnets route 0.0.0.0/0 → AZ-local NAT Gateway
[x] Database subnets have local-only route table (no internet egress)
[x] Security Groups reference by name (sg-prod-alb, sg-prod-app, sg-prod-db)
[x] NACLs allow ephemeral ports (1024-65535) for return traffic
[x] VPC Flow Logs capture ALL traffic to S3 with 1-year retention
[x] Gateway Endpoints for S3 and DynamoDB deployed to all route tables
[x] Interface Endpoints for private-service connectivity (6 services × 3 AZs)
[x] DNS hostnames and support enabled
FINDINGS:
- [INFO] Gateway Endpoints for S3/DynamoDB will save ~$200/month in NAT processing
- [INFO] Estimated monthly cost: VPC $0 + NAT $96 + Interface Endpoints $126 + Flow Logs S3 $10 = ~$232/month
- [NOTE] IPv6 dual-stack requires Egress-Only Internet Gateway for private subnets
DEPLOY_COMMANDS:
1. aws ec2 create-vpc --cidr-block 10.0.0.0/16 --amazon-provided-ipv6-cidr-block
2. aws ec2 modify-vpc-attribute --vpc-id <vpc> --enable-dns-hostnames
3. aws ec2 modify-vpc-attribute --vpc-id <vpc> --enable-dns-support
4. aws ec2 create-internet-gateway + attach
5. aws ec2 create-egress-only-internet-gateway
6. aws ec2 create-subnet (×9: 3 tiers × 3 AZs)
7. aws ec2 create-nat-gateway (×3: one per AZ, in public subnets)
8. aws ec2 create-route-table (×7: 1 public + 3 private + 3 database)
9. aws ec2 create-security-group (×4: alb, app, db, bastion)
10. aws ec2 create-network-acl (×3: one per tier)
11. aws ec2 create-flow-logs --traffic-type ALL --log-destination-type s3
12. aws ec2 create-vpc-endpoint --vpc-endpoint-type Gateway (×2: S3, DynamoDB)
13. aws ec2 create-vpc-endpoint --vpc-endpoint-type Interface (×6 services)
Verification commands (run after deployment)
Verification commands (run after deployment) — moved verbatim.
Full detail: Diagnostic commands.
Edge-case handling
Edge-case handling catalog — moved verbatim.
Full detail: Advanced Patterns.
Anti-Patterns — NEVER
NEVER use 192.168.0.0/16 as a VPC CIDR without checking for overlap
with corporate VPN, home networks, or office WiFi. 192.168.x.x is the
most common home/office range. Overlap breaks VPN connectivity for
remote workers.
NEVER create a single-tier VPC (all public subnets) for production.
This eliminates all network isolation. Every instance is directly
internet-reachable. Even with a strict security group, a single SG
misconfiguration exposes every workload. Always use at least two tiers
(public + private).
NEVER put a database in a public subnet. Database subnets must have NO
internet route (0.0.0.0/0). The route table should have only the
local route. This is the defense-in-depth mechanism that prevents
data exfiltration even if the security group is misconfigured.
NEVER use the VPC "main" route table for private subnets. The main
route table is the default and is used by any subnet without an explicit
association. If you add an IGW route to the main table, every untagged
subnet becomes public. Always create dedicated route tables per tier
and associate subnets explicitly.
NEVER deploy a NAT Gateway in a private subnet. The NAT Gateway must
be in a public subnet with an IGW route. Deploying it in a private
subnet fails — the NAT cannot route to the internet.
NEVER use a single NAT Gateway for a production multi-AZ VPC unless
you accept the AZ-failure risk. If the NAT Gateway's AZ fails, all
private-subnet egress fails. For production, use one NAT Gateway per
AZ and route each private subnet to its AZ-local NAT.
NEVER open Security Group inbound to 0.0.0.0/0 on ports other than
80/443. The only resources that should accept traffic from the entire
internet are public ALBs and NLBs on web ports. App servers, databases,
and internal services must reference specific security groups.
NEVER reference CIDR ranges in Security Group rules when a SG reference
is available. Source: sg-app-xxx is more secure and maintainable than
Source: 10.0.48.0/20. CIDR-based rules break when subnet ranges
change and are harder to audit.
NEVER skip VPC Flow Logs for a production VPC. Without Flow Logs, you
cannot diagnose connectivity issues, investigate security incidents, or
satisfy compliance requirements. The cost ($0.023/GB/month on S3) is
trivial relative to the forensic value.
NEVER forget the ephemeral port rule in NACLs. NACLs are stateless —
outbound HTTPS (port 443) requires allowing inbound return traffic on
ephemeral ports (1024-65535). Without this rule, all outbound
connections from the NACL-protected subnet fail silently.
NEVER skip Gateway Endpoints for S3 and DynamoDB. They are FREE, route
through the AWS backbone (lower latency than NAT), and save NAT Gateway
data-processing costs ($0.045/GB). There is no downside to deploying
them.
NEVER assume Interface Endpoints work without private DNS. Without
--private-dns-enabled, SDKs that construct URLs from the public DNS
name route traffic through the NAT Gateway, not the endpoint. Always
enable private DNS unless you have a specific multi-VPC reason not to.
NEVER use enableDnsHostnames: true without enableDnsSupport: true.
Both are required for DNS resolution within the VPC. Enabling hostnames
without support produces instances with DNS names that do not resolve.
NEVER assume IPv6 is private by default. IPv6 addresses are
internet-routable. A dual-stack VPC without an Egress-Only Internet
Gateway has IPv6 traffic routed directly to the IGW — private IPv6
subnets are reachable from the internet. Always deploy EIGW for IPv6
egress control.
NEVER create a VPC peering connection to a VPC with an overlapping
CIDR. VPC peering does NOT support overlapping CIDRs. The peering
connection will be created but routes cannot be added — traffic will
not flow. Choose non-overlapping CIDRs at VPC creation time.
NEVER forget that Transit Gateway has per-attachment cost. For 2 VPCs,
peering is cheaper ($0 + data transfer). TGW costs ~$33/month for 2
attachments. Use TGW only when the topology complexity justifies it
(3+ VPCs, multi-account, VPN/Direct Connect integration).
Pre-flight safety checks (run before any deployment CLI)
Pre-flight safety checks (run before any deployment CLI) — moved verbatim.
Full detail: Diagnostic commands.
Expert knowledge: non-obvious VPC behaviors
Expert knowledge — non-obvious VPC behaviors — moved verbatim.
Full detail: Advanced Patterns.
Deep reference: VPC networking internals
Deep reference — VPC networking internals — moved verbatim.
Full detail: Advanced Patterns.
Recent AWS features (2024-2026)
Recent AWS features (2024-2026) — moved verbatim.
Full detail: Advanced Patterns.
References (load on demand)
- Worked examples — PREREQUISITES_MISSING output example; full worked example kept in SKILL.md
- Diagnostic commands — live pre-flight checks, post-deployment verification commands, pre-flight safety checks
- Advanced patterns — Step 0 expert knowledge, per-step rationale and standard layouts, edge cases, expert behaviors, deep reference, recent features
- CIDR planning guide — RFC 1918 ranges, sizing rationale
- VPC endpoint types — interface endpoint service table, deployment and private DNS
Domain
AWS CloudOps / VPC Networking & Infrastructure Provisioning.
AWS documentation
1---2name: vpc-network-deployer3description: 'Provisions production-grade VPCs with secure, well-architected network infrastructure: RFC 1918 CIDR planning with growth headroom, multi-AZ public/private/database subnet tiers, NAT Gateway HA placement (1-per-AZ vs single for cost), Internet Gateway vs Egress-Only Gateway (IPv6), least-privilege route table design (public→IGW, private→NAT, database→ local-only), Security Groups that reference by name not CIDR, stateless NACLs for defense-in-depth, VPC Flow Logs with long retention, Gateway (S3/DynamoDB — free) vs Interface VPC Endpoints (private DNS, per-AZ cost), DHCP option sets and Route 53 Resolver DNS resolution, VPC peering vs Transit Gateway for multi-VPC, and IPv6 dual-stack considerations. Emits a deterministic deployment plan with a READY_TO_DEPLOY checklist and network architecture validation. Use when provisioning a new VPC, designing multi-tier subnet layouts, planning CIDR ranges to avoid overlaps, configuring NAT Gateway topology, setting up VPC endpoints for private connectivity, or...'4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline architecture planning. Live deployment uses aws ec2 create-vpc, create-subnet, create-route-table, create-nat-gateway, create-security-group, create-flow-logs, create-vpc-endpoint, and describe-* verification commands (AWS CLI v2, SSO or key-based credentials).6metadata:7 source: https://skillmd.com/skills/jhkchan/vpc-network-deployer8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '1'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Networking15 task_type: deploy16 skill_class: capability17 verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING18 when_to_use: Provisioning a new VPC for production, designing a multi-tier subnet layout (public/private/database), planning CIDR ranges to avoid overlaps with existing networks, selecting NAT Gateway topology for HA vs cost, configuring VPC endpoints for private S3/DynamoDB connectivity, setting up VPC Flow Logs for security forensics, designing route tables for least-privilege traffic flow, hardening VPC security groups and NACLs, or planning IPv6 dual-stack support.19 activation_triggers: create a new VPC, provision VPC network, plan CIDR ranges for VPC, design multi-AZ subnets, NAT gateway HA topology, VPC endpoint configuration, VPC flow logs setup, security group and NACL design, VPC route table design, IPv6 dual-stack VPC, Transit Gateway vs VPC peering20 invocation_schema: 'Input shape (one of): (a) a deployment specification including region, AZ count, CIDR range, tier requirements (public/private/database), NAT strategy (HA vs cost), endpoint requirements, and flow-log destination; (b) a partial spec for interactive refinement (e.g., "3-AZ VPC in us-east-1 with /16 CIDR, private-only"); (c) an existing VPC ID for architecture review against the well-architected checklist. Output shape: { VPC_SPEC, VERDICT, ARCHITECTURE, CHECKLIST[], FINDINGS[], DEPLOY_COMMANDS } where VERDICT ∈ { READY_TO_DEPLOY, PREREQUISITES_MISSING, ERROR }.'21 version: 0.1.022 author: Jacky Chan — AWS Community Builder23 keywords: VPC, CIDR planning, RFC 1918, subnet design, multi-AZ, public subnet, private subnet, database subnet, NAT Gateway, Internet Gateway, Egress-Only Gateway, route table, Security Group, NACL, VPC Flow Logs, VPC Endpoint, Gateway Endpoint, Interface Endpoint, PrivateLink, DHCP options, Route 53 Resolver, VPC peering, Transit Gateway, IPv6 dual-stack, network architecture24 tags: vpc, networking, deploy, subnets, nat-gateway, route-tables, security-groups, nacl, flow-logs, vpc-endpoints, ipv6, transit-gateway25---2627# VPC Network Deployer2829## Mindset3031**One-line takeaway:** a production VPC is not "a /16 with subnets" — it is32a **routing graph** where every route-table entry, every security-group33rule, and every NACL rule is an explicit security decision. The CIDR block34is the least interesting part; the **subnet tiering, NAT topology, and35endpoint strategy** determine blast radius, cost, and failover behavior.3637Three facts make VPC provisioning different from "draw a network diagram":3839Mindset — three facts that make VPC provisioning different — moved verbatim.40Full detail: [Advanced Patterns](references/advanced-patterns.md).4142## Quick reference — deployment checklist4344| Dimension | Requirement | Step |45|---|---|---|46| CIDR block | RFC 1918, no overlap with existing VPCs/on-prem, /16 minimum for production | Step 1 |47| Subnet tiers | Public, private, and database tiers across N AZs (N ≥ 2, recommend 3) | Step 2 |48| Internet Gateway | Attached for public subnet egress | Step 3 |49| NAT Gateway | 1 per AZ (HA) or 1 in AZ-a (cost-optimized) | Step 4 |50| Route tables | Public→IGW, private→NAT (AZ-local), database→local-only | Step 5 |51| Security Groups | Least-privilege, reference by SG name/ID, not CIDR | Step 6 |52| NACLs | Stateless defense-in-depth for known IP ranges | Step 7 |53| VPC Flow Logs | All-traffic, S3 or CloudWatch, 1-year retention | Step 8 |54| VPC Endpoints | Gateway (S3, DynamoDB — free) + Interface for private services | Step 9 |55| DNS | enableDnsHostnames + enableDnsSupport true, DHCP option set | Step 10 |56| IPv6 | Dual-stack optional; Egress-Only Gateway for IPv6 egress | Step 11 |57| Multi-VPC | Transit Gateway for >2 VPCs; peering for 1:1 | Step 12 |5859## Pre-flight: deployment specification gate (run before architecture output)6061Before producing the deployment plan, validate the input specification.62Several requirements **block deployment** — proceeding with an invalid63spec produces a non-functional or insecure VPC.6465Live-account pre-flight checks (deployment spec gate) — moved verbatim.66Full detail: [Diagnostic commands](references/diagnostic-commands.md).6768| Attribute | Value | Effect on plan |69|---|---|---|70| Region | Valid AWS region | Determines available AZs and service endpoints |71| AZ count | 2 | Minimum for HA. Acceptable but not ideal — single AZ failure takes 50% of capacity. |72| AZ count | 3 | **Recommended.** Survives a single AZ failure with 67% capacity. Standard for production. |73| CIDR block | /16 to /28 | /16 (65,536 IPs) recommended for production. /20 is the practical minimum for a 3-tier, 3-AZ layout. |74| NAT strategy | HA (1 per AZ) | ~$96/month base + data processing. Survives AZ failure. |75| NAT strategy | Cost-optimized (1) | ~$32/month base + data processing. Single AZ failure cuts egress. |76| Endpoint budget | None | All traffic routes through NAT — higher cost, lower security |77| IPv6 | Dual-stack | Requires /56 IPv6 CIDR assigned by AWS. Egress-Only Gateway for private IPv6 egress. |7879**If the deployment spec is incomplete** (missing region, CIDR range, or80AZ count), output:8182PREREQUISITES_MISSING output example (incomplete deployment spec) — moved verbatim.83Full detail: [Worked examples](references/worked-examples.md).8485## Process — Architecture planning (apply in order, produce deployment plan)8687### Step 0: Expert knowledge — non-obvious VPC behaviors that change the plan8889These behaviors are easy to misjudge without operational VPC experience.90Each changes the architecture if ignored:9192Step 0 — expert knowledge: non-obvious VPC behaviors that change the plan — moved verbatim.93Full detail: [Advanced Patterns](references/advanced-patterns.md).9495### Step 1: CIDR planning9697RFC 1918 private ranges (Step 1) — moved verbatim.98Full detail: [CIDR planning guide](references/cidr-planning-guide.md).99100**CIDR allocation strategy for a /16 VPC (10.0.0.0/16):**101102| Tier | AZ-a | AZ-b | AZ-c | Mask | IPs per subnet |103|---|---|---|---|---|---|104| Public | 10.0.0.0/20 | 10.0.16.0/20 | 10.0.32.0/20 | /20 | 4,094 |105| Private (app) | 10.0.48.0/20 | 10.0.64.0/20 | 10.0.80.0/20 | /20 | 4,094 |106| Database | 10.0.96.0/24 | 10.0.97.0/24 | 10.0.98.0/24 | /24 | 254 |107| Reserved | 10.0.112.0/20 | 10.0.128.0/17 | — | — | Future expansion |108109**Overlap-check rule:** Before deploying, the CIDR range MUST be checked110against:1111. Existing VPCs in the account (`describe-vpcs`)1122. VPCs in peered accounts (peering connections)1133. On-premises CIDR ranges (Direct Connect, VPN)1144. Transit Gateway-attached VPCs1155. Reserved CIDR ranges for future VPCs116117If ANY overlap exists → **PREREQUISITES_MISSING**. A non-overlapping CIDR118range is mandatory.119120Sizing rationale — why /16 and /20 per tier (Step 1) — moved verbatim.121Full detail: [CIDR planning guide](references/cidr-planning-guide.md).122123### Step 2: Subnet tier design124125**Three-tier model (recommended for production):**126127| Tier | Purpose | Route table | Internet egress |128|---|---|---|---|129| Public | ALB, NAT Gateway, Bastion | 0.0.0.0/0 → IGW | Direct via IGW |130| Private | Application workloads (ECS, EKS, EC2, Lambda-VPC) | 0.0.0.0/0 → NAT (AZ-local) | NAT Gateway |131| Database | RDS, ElastiCache, Redshift | Local only | No internet egress |132133Why database subnets have no internet route (Step 2); Two-tier model (Step 2) — moved verbatim.134Full detail: [Advanced Patterns](references/advanced-patterns.md).135136**One-tier model (NEVER for production):**137- All resources in public subnets. No isolation. Only acceptable for138 throwaway sandboxes or demos. Flag as PREREQUISITES_MISSING.139140### Step 3: Internet Gateway and public egress141142Internet Gateway, EIGW, and deployment commands (Step 3) — moved verbatim.143Full detail: [Advanced Patterns](references/advanced-patterns.md).144145### Step 4: NAT Gateway topology146147**HA topology (1 NAT Gateway per AZ):**148- Each private subnet routes to its AZ-local NAT Gateway.149- Survives AZ failure without cross-AZ data charges for NAT.150- Cost: ~$32/month × N AZs = ~$96/month for 3 AZs, plus per-GB.151- **Recommended for production.**152153**Cost-optimized topology (1 NAT Gateway in AZ-a):**154- All private subnets route to the single NAT Gateway in AZ-a.155- If AZ-a fails, all private egress fails.156- Cross-AZ data transfer charges apply for AZ-b/c traffic routing to AZ-a NAT.157- Cost: ~$32/month, plus per-GB + cross-AZ.158- **Acceptable for dev/staging. Flag as a finding for production.**159160NAT Gateway deployment commands (Step 4); NAT anti-pattern — never a private subnet (Step 4) — moved verbatim.161Full detail: [Advanced Patterns](references/advanced-patterns.md).162163### Step 5: Route table design164165**Public route table (one per VPC, associated with all public subnets):**166167| Destination | Target | Purpose |168|---|---|---|169| 10.0.0.0/16 | local | VPC-internal routing |170| 0.0.0.0/0 | igw-xxx | Internet egress |171| ::/0 | igw-xxx | IPv6 internet egress (if dual-stack) |172173**Private route table (one per AZ, associated with AZ's private subnet):**174175| Destination | Target | Purpose |176|---|---|---|177| 10.0.0.0/16 | local | VPC-internal routing |178| 0.0.0.0/0 | nat-xxx (AZ-local) | NAT egress via AZ-local NAT |179| ::/0 | eigw-xxx | IPv6 egress (Egress-Only Gateway) |180181**Database route table (one per AZ, associated with AZ's database subnet):**182183| Destination | Target | Purpose |184|---|---|---|185| 10.0.0.0/16 | local | VPC-internal routing ONLY |186187**Critical:** The database route table has NO `0.0.0.0/0` route. This is188the defense-in-depth mechanism. Even if a database instance is compromised189and its SG is opened, the instance cannot reach the internet.190191Why one private route table per AZ (Step 5) — moved verbatim.192Full detail: [Advanced Patterns](references/advanced-patterns.md).193194### Step 6: Security Groups195196Security Groups are **stateful** — return traffic is automatically allowed197for any allowed connection. Design principles:1981991. **Reference by name/ID, not CIDR.** Use `Source: sg-xxx` instead of200 `Source: 10.0.1.0/24`. This prevents scope creep when CIDR ranges201 change.2022. **Least-privilege ports.** Allow only the exact port needed (e.g.,203 `443/tcp` not `0-65535/tcp`).2043. **No `0.0.0.0/0` inbound except for public ALBs.** The ALB security205 group allows `443/tcp` from `0.0.0.0/0`; the app security group allows206 `8080/tcp` from the ALB security group only.2074. **Separate SG per tier.** Public SG, App SG, Database SG — never reuse208 one SG across tiers.209210Standard security group layout (Step 6) — moved verbatim.211Full detail: [Advanced Patterns](references/advanced-patterns.md).212213### Step 7: Network ACLs (NACLs)214215NACLs are **stateless** — each connection requires an explicit inbound216AND outbound rule. They are evaluated before Security Groups. Use NACLs217for:218219NACL use cases and scope limits (Step 7); Standard NACL layout and ephemeral ports (Step 7) — moved verbatim.220Full detail: [Advanced Patterns](references/advanced-patterns.md).221222### Step 8: VPC Flow Logs223224VPC Flow Logs capture metadata about IP traffic to/from network interfaces225in the VPC. They are essential for:226227Why VPC Flow Logs (Step 8); Flow log destination options and recommendation (Step 8); Flow logs deployment command (Step 8); Flow logs configuration requirements (Step 8) — moved verbatim.228Full detail: [Advanced Patterns](references/advanced-patterns.md).229230### Step 9: VPC Endpoints231232**Gateway Endpoints (free):**233234| Service | Endpoint | Notes |235|---|---|---|236| S3 | `com.amazonaws.<region>.s3` | Route-table-based. No per-hour/per-GB cost. Add to every route table that needs S3 access from private subnets. |237| DynamoDB | `com.amazonaws.<region>.dynamodb` | Route-table-based. Same as S3. |238239**Always deploy Gateway Endpoints for S3 and DynamoDB.** They save NAT240Gateway data-processing costs ($0.045/GB) and improve latency. There is241no downside.242243**Interface Endpoints (ENI-based, ~$7/month per AZ):**244245Interface endpoint service table (Step 9); Interface endpoint deployment and private DNS (Step 9) — moved verbatim.246Full detail: [VPC endpoint types](references/vpc-endpoint-types.md).247248### Step 10: DNS resolution249250DNS required VPC attributes commands (Step 10); DNS both-true requirements and DHCP option set commands (Step 10); AmazonProvidedDNS explanation (Step 10) — moved verbatim.251Full detail: [Advanced Patterns](references/advanced-patterns.md).252253### Step 11: IPv6 dual-stack considerations254255IPv6 is optional but recommended for public-facing workloads (ALB, NAT64).256257IPv6 association commands (Step 11) — moved verbatim.258Full detail: [Advanced Patterns](references/advanced-patterns.md).259260**Key differences from IPv4:**261- IPv6 addresses are **internet-routable by default**. There is no NAT for262 IPv6. Private IPv6 subnets need an Egress-Only Internet Gateway.263- Security Groups and NACLs filter IPv6 traffic independently. A rule264 allowing `0.0.0.0/0` does NOT allow IPv6 — add `::/0` explicitly.265- NAT Gateway does NOT process IPv6 traffic. IPv6 egress uses EIGW.266- Route 53 Resolver supports IPv6 (AAAA records) with AmazonProvidedDNS.267268### Step 12: Multi-VPC connectivity269270Multi-VPC connectivity options — peering vs Transit Gateway detail (Step 12) — moved verbatim.271Full detail: [Advanced Patterns](references/advanced-patterns.md).272273**Decision rule:** If you have ≤2 VPCs and no VPN/Direct Connect, use274peering. If you have ≥3 VPCs, multi-account, or need centralized routing,275use Transit Gateway. Migrating from peering to TGW later is painful —276plan for growth.277278## Output format (per VPC deployment plan)279280```text281VPC_SPEC: <name>282VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING283ARCHITECTURE:284 Region: <region>285 CIDR: <vpc-cidr> (IPv4), <ipv6-cidr> (IPv6, if dual-stack)286 AZs: [<az-a>, <az-b>, <az-c>]287 Tiers:288 - Public: [<subnet-a>, <subnet-b>, <subnet-c>] → IGW289 - Private: [<subnet-a>, <subnet-b>, <subnet-c>] → NAT (HA per-AZ)290 - Database: [<subnet-a>, <subnet-b>, <subnet-c>] → local-only291 NAT: <HA (3 NAT Gateways, one per AZ) | Cost-optimized (1 NAT Gateway)>292 Endpoints: [Gateway: S3, DynamoDB | Interface: SecretsManager, SSM, KMS, ...]293 Flow Logs: S3 destination, 1-year retention294 DNS: enableDnsHostnames + enableDnsSupport, AmazonProvidedDNS295CHECKLIST:296 [x] CIDR range is RFC 1918 and does not overlap with existing VPCs/on-prem297 [x] Subnet tiers span 3 AZs with growth headroom (/20 per tier per AZ)298 [x] Public subnets route 0.0.0.0/0 → IGW299 [x] Private subnets route 0.0.0.0/0 → AZ-local NAT Gateway300 [x] Database subnets have NO internet route (local-only)301 [x] Security Groups reference by name/ID, least-privilege ports302 [x] NACLs allow ephemeral ports for return traffic303 [x] VPC Flow Logs capture ALL traffic to S3 with 1-year retention304 [x] Gateway Endpoints for S3 and DynamoDB (free, no downside)305 [x] Interface Endpoints for private-service connectivity306 [x] DNS hostnames and support enabled307FINDINGS:308 - [INFO] Gateway Endpoints for S3/DynamoDB will save ~$X/month in NAT processing309 - [WARN] Cost-optimized NAT topology — AZ-a failure cuts all private egress310DEPLOY_COMMANDS:311 <ordered list of aws ec2 create-* commands>312```313314### Worked example — 3-AZ HA VPC with full tiers315316```text317VPC_SPEC: prod-vpc-useast1318VERDICT: READY_TO_DEPLOY319ARCHITECTURE:320 Region: us-east-1321 CIDR: 10.0.0.0/16 (IPv4), 2600:1f18:xxxx::/56 (IPv6 dual-stack)322 AZs: [us-east-1a, us-east-1b, us-east-1c]323 Tiers:324 - Public: [10.0.0.0/20, 10.0.16.0/20, 10.0.32.0/20] → IGW325 - Private: [10.0.48.0/20, 10.0.64.0/20, 10.0.80.0/20] → NAT (HA per-AZ)326 - Database: [10.0.96.0/24, 10.0.97.0/24, 10.0.98.0/24] → local-only327 NAT: HA (3 NAT Gateways, one per AZ, ~$96/month base)328 Endpoints:329 - Gateway: S3, DynamoDB (free)330 - Interface: SecretsManager, SSM, KMS, CloudWatch Logs, STS (~$126/month)331 Flow Logs: S3 destination (arn:aws:s3:::prod-vpc-flow-logs), 1-year retention332 DNS: enableDnsHostnames + enableDnsSupport, AmazonProvidedDNS333CHECKLIST:334 [x] CIDR 10.0.0.0/16 is RFC 1918, no overlap with existing VPCs or on-prem335 [x] Subnet tiers span 3 AZs with /20 growth headroom per tier per AZ336 [x] Public subnets route 0.0.0.0/0 → igw-prod337 [x] Private subnets route 0.0.0.0/0 → AZ-local NAT Gateway338 [x] Database subnets have local-only route table (no internet egress)339 [x] Security Groups reference by name (sg-prod-alb, sg-prod-app, sg-prod-db)340 [x] NACLs allow ephemeral ports (1024-65535) for return traffic341 [x] VPC Flow Logs capture ALL traffic to S3 with 1-year retention342 [x] Gateway Endpoints for S3 and DynamoDB deployed to all route tables343 [x] Interface Endpoints for private-service connectivity (6 services × 3 AZs)344 [x] DNS hostnames and support enabled345FINDINGS:346 - [INFO] Gateway Endpoints for S3/DynamoDB will save ~$200/month in NAT processing347 - [INFO] Estimated monthly cost: VPC $0 + NAT $96 + Interface Endpoints $126 + Flow Logs S3 $10 = ~$232/month348 - [NOTE] IPv6 dual-stack requires Egress-Only Internet Gateway for private subnets349DEPLOY_COMMANDS:350 1. aws ec2 create-vpc --cidr-block 10.0.0.0/16 --amazon-provided-ipv6-cidr-block351 2. aws ec2 modify-vpc-attribute --vpc-id <vpc> --enable-dns-hostnames352 3. aws ec2 modify-vpc-attribute --vpc-id <vpc> --enable-dns-support353 4. aws ec2 create-internet-gateway + attach354 5. aws ec2 create-egress-only-internet-gateway355 6. aws ec2 create-subnet (×9: 3 tiers × 3 AZs)356 7. aws ec2 create-nat-gateway (×3: one per AZ, in public subnets)357 8. aws ec2 create-route-table (×7: 1 public + 3 private + 3 database)358 9. aws ec2 create-security-group (×4: alb, app, db, bastion)359 10. aws ec2 create-network-acl (×3: one per tier)360 11. aws ec2 create-flow-logs --traffic-type ALL --log-destination-type s3361 12. aws ec2 create-vpc-endpoint --vpc-endpoint-type Gateway (×2: S3, DynamoDB)362 13. aws ec2 create-vpc-endpoint --vpc-endpoint-type Interface (×6 services)363```364365## Verification commands (run after deployment)366367Verification commands (run after deployment) — moved verbatim.368Full detail: [Diagnostic commands](references/diagnostic-commands.md).369370## Edge-case handling371372Edge-case handling catalog — moved verbatim.373Full detail: [Advanced Patterns](references/advanced-patterns.md).374375## Anti-Patterns — NEVER376377- NEVER use `192.168.0.0/16` as a VPC CIDR without checking for overlap378 with corporate VPN, home networks, or office WiFi. 192.168.x.x is the379 most common home/office range. Overlap breaks VPN connectivity for380 remote workers.381382- NEVER create a single-tier VPC (all public subnets) for production.383 This eliminates all network isolation. Every instance is directly384 internet-reachable. Even with a strict security group, a single SG385 misconfiguration exposes every workload. Always use at least two tiers386 (public + private).387388- NEVER put a database in a public subnet. Database subnets must have NO389 internet route (`0.0.0.0/0`). The route table should have only the390 `local` route. This is the defense-in-depth mechanism that prevents391 data exfiltration even if the security group is misconfigured.392393- NEVER use the VPC "main" route table for private subnets. The main394 route table is the default and is used by any subnet without an explicit395 association. If you add an IGW route to the main table, every untagged396 subnet becomes public. Always create dedicated route tables per tier397 and associate subnets explicitly.398399- NEVER deploy a NAT Gateway in a private subnet. The NAT Gateway must400 be in a public subnet with an IGW route. Deploying it in a private401 subnet fails — the NAT cannot route to the internet.402403- NEVER use a single NAT Gateway for a production multi-AZ VPC unless404 you accept the AZ-failure risk. If the NAT Gateway's AZ fails, all405 private-subnet egress fails. For production, use one NAT Gateway per406 AZ and route each private subnet to its AZ-local NAT.407408- NEVER open Security Group inbound to `0.0.0.0/0` on ports other than409 80/443. The only resources that should accept traffic from the entire410 internet are public ALBs and NLBs on web ports. App servers, databases,411 and internal services must reference specific security groups.412413- NEVER reference CIDR ranges in Security Group rules when a SG reference414 is available. `Source: sg-app-xxx` is more secure and maintainable than415 `Source: 10.0.48.0/20`. CIDR-based rules break when subnet ranges416 change and are harder to audit.417418- NEVER skip VPC Flow Logs for a production VPC. Without Flow Logs, you419 cannot diagnose connectivity issues, investigate security incidents, or420 satisfy compliance requirements. The cost ($0.023/GB/month on S3) is421 trivial relative to the forensic value.422423- NEVER forget the ephemeral port rule in NACLs. NACLs are stateless —424 outbound HTTPS (port 443) requires allowing inbound return traffic on425 ephemeral ports (1024-65535). Without this rule, all outbound426 connections from the NACL-protected subnet fail silently.427428- NEVER skip Gateway Endpoints for S3 and DynamoDB. They are FREE, route429 through the AWS backbone (lower latency than NAT), and save NAT Gateway430 data-processing costs ($0.045/GB). There is no downside to deploying431 them.432433- NEVER assume Interface Endpoints work without private DNS. Without434 `--private-dns-enabled`, SDKs that construct URLs from the public DNS435 name route traffic through the NAT Gateway, not the endpoint. Always436 enable private DNS unless you have a specific multi-VPC reason not to.437438- NEVER use `enableDnsHostnames: true` without `enableDnsSupport: true`.439 Both are required for DNS resolution within the VPC. Enabling hostnames440 without support produces instances with DNS names that do not resolve.441442- NEVER assume IPv6 is private by default. IPv6 addresses are443 internet-routable. A dual-stack VPC without an Egress-Only Internet444 Gateway has IPv6 traffic routed directly to the IGW — private IPv6445 subnets are reachable from the internet. Always deploy EIGW for IPv6446 egress control.447448- NEVER create a VPC peering connection to a VPC with an overlapping449 CIDR. VPC peering does NOT support overlapping CIDRs. The peering450 connection will be created but routes cannot be added — traffic will451 not flow. Choose non-overlapping CIDRs at VPC creation time.452453- NEVER forget that Transit Gateway has per-attachment cost. For 2 VPCs,454 peering is cheaper ($0 + data transfer). TGW costs ~$33/month for 2455 attachments. Use TGW only when the topology complexity justifies it456 (3+ VPCs, multi-account, VPN/Direct Connect integration).457458## Pre-flight safety checks (run before any deployment CLI)459460Pre-flight safety checks (run before any deployment CLI) — moved verbatim.461Full detail: [Diagnostic commands](references/diagnostic-commands.md).462463## Expert knowledge: non-obvious VPC behaviors464465Expert knowledge — non-obvious VPC behaviors — moved verbatim.466Full detail: [Advanced Patterns](references/advanced-patterns.md).467468## Deep reference: VPC networking internals469470Deep reference — VPC networking internals — moved verbatim.471Full detail: [Advanced Patterns](references/advanced-patterns.md).472473## Recent AWS features (2024-2026)474475Recent AWS features (2024-2026) — moved verbatim.476Full detail: [Advanced Patterns](references/advanced-patterns.md).477478## References (load on demand)479480- [Worked examples](references/worked-examples.md) — PREREQUISITES_MISSING output example; full worked example kept in SKILL.md481- [Diagnostic commands](references/diagnostic-commands.md) — live pre-flight checks, post-deployment verification commands, pre-flight safety checks482- [Advanced patterns](references/advanced-patterns.md) — Step 0 expert knowledge, per-step rationale and standard layouts, edge cases, expert behaviors, deep reference, recent features483- [CIDR planning guide](references/cidr-planning-guide.md) — RFC 1918 ranges, sizing rationale484- [VPC endpoint types](references/vpc-endpoint-types.md) — interface endpoint service table, deployment and private DNS485486## Domain487488AWS CloudOps / VPC Networking & Infrastructure Provisioning.489490## AWS documentation491492- **Amazon VPC User Guide** — https://docs.aws.amazon.com/vpc/latest/userguide/493- **VPC Security** — https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security.html494- **VPC CIDR Blocks** — https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html495- **VPC Endpoints** — https://docs.aws.amazon.com/vpc/latest/privatelink/concepts.html496- **VPC Flow Logs** — https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html497- **NAT Gateways** — https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html498- **Transit Gateway** — https://docs.aws.amazon.com/vpc/latest/tgw/what-is-transit-gateway.html499- **VPC Peering** — https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html500- **AWS CLI EC2 Reference** — https://docs.aws.amazon.com/cli/latest/reference/ec2/