aws-notebook

My AWS Notebook

View the Project on GitHub kyhau/aws-notebook

Secure Network Infrastructure


VPC Endpoints (Gateway Endpoints and Interface Endpoints)

VPC Endpoints allow access to public AWS services, or service provided by 3rd parties, without requiring an Internet Gateway to be attached to the VPC, or any NAT instance/gateway. It means your network communications no longer have to flow over the public internet to reach the public interfaces of AWS services such as S3, API Gateways, etc.

Gateway Endpoints


NAT Gateways vs. NAT Instances

NAT Gateways (Network Address Translation Gateways)

NAT Instances (Network Address Translation Instances)


Egress-Only: NAT Instance/Gateway for IPv4 vs. Engress-Only Internet Gateway for IPv6

  1. With IPv4, all AWS resources have a private IP. Some can be provided with a public IP and connectivity, using an Internet Gateway (IGW). With IPv4 a NAT Instance/Gateway can be utilized to provide egress-only access.

  2. IPv6 addressing is globally unique and publicly routable. Supported resources in AWS are all publicly addressable, so a NAT Gateway isn’t an option.

  3. An Egress-Only Internet Gateway (EIGW) provides a feature-limited Internet Gateway, specifically for IPv6, and only allowing outbound connections and return traffic (stateful). No incoming IPv6 connections can be initiated to VPC resources using Egress-Only Gateway.

    • The VPC router via a route table needs to have a IPv6 default route (or a specific one) added.
    • E.g. Route: Destination= ::/0, Target= eigw-1111222233334444 (EIGW-ID)
    • Note: IPv6 format: (::/0), IPv4 format: (0.0.0.0/0)
    • Optionally you can have a route for IPv4 traffic via a NAT and IGW combination.
    • You cannot restrict connections based on DNS, IP or authentication on the Gateway itself.