AWS::EC2::NatGateway
Network Address Translation(NAT)- It allows private subnets to access public subnets
- The NAT gateway is associated with a public subnet
- IPv4 only

- NAT Instances (deprecated)
- It's a
service(deployed inEC2). It must be deployed in apublic subnetwith inbound rule on port 80 allowing traffic from theprivate subnet - Allow private subnets (no public ip) to reach internet (by means of the nat instance in the public subnet)
- Must disable
Source/Destination Checkin EC2 instance -
A record for
destination to 0.0.0.0/0 with target to NAT instancemust be inserted in theroute tablefor the private subnet -
NAT Gateway
- AWS Managed! (alternative to NAT instance)
5 Gbpsbandwidth with automatic scaling up to 45 Gbps- NAT Gateway receives an Elastic IP
- Single AZ (but can be deployed to multiple AZs)
Properties
Type: AWS::EC2::NatGateway
Properties:
AllocationId: String
ConnectivityType: String
MaxDrainDurationSeconds: Integer
PrivateIpAddress: String
SecondaryAllocationIds:
- String
SecondaryPrivateIpAddressCount: Integer
SecondaryPrivateIpAddresses:
- String
SubnetId: String
Tags:
- Tag