Decision ADR-0005 · The Lighthouse
Private origin via CloudFront VPC origin, IPv6 egress, no NAT or public IPv4
Accepted ·
Context
Two standard pieces of networking would each break the budget:
- A public IPv4 address costs $3.65/month.
- A NAT gateway costs $33+/month.
On top of that, the game server should not be reachable from the internet at all. Since May 2026, CloudFront supports WebSockets to VPC origins at no extra cost.
Decision
Network
- The EC2 instance sits in a private dual-stack subnet, with a private IPv4 address and IPv6.
- CloudFront reaches it through a VPC origin, on port 8080.
- The security group allows only the CloudFront VPC-origin group.
Outbound traffic
- IPv6 goes through an egress-only internet gateway, to dual-stack AWS endpoints (SSM, STS, CloudWatch, Lambda).
- S3 and DynamoDB go through free gateway endpoints.
Access
- Admin access uses SSM Session Manager. There is no SSH.
Consequences
- + No public IP and no open ports.
- + $0 in networking cost.
- − Depends on recent AWS features, so they are verified first in M6.
- Fallback: a public IPv6 origin locked to CloudFront's prefix list
pl-029b73ad1ccf6fe97, plus TLS at the origin.