- Newest
- Most votes
- Most comments
Based on your CloudFormation template and the errors you're encountering, there are two key issues with your PrivateNatRoute2 resource:
-
You need to specify a destination CIDR block for IPv6 traffic. For IPv6 routes, you must include the
DestinationIpv6CidrBlockproperty with a value of::/0(which represents all IPv6 addresses). -
You're including both
EgressOnlyInternetGatewayIdandNatGatewayIdin the same route. According to AWS requirements, you must specify exactly one target resource for a route.
Here's how your PrivateNatRoute2 resource should be configured:
PrivateNatRoute2: DependsOn: 'PrivateNatRoute1' Type: AWS::EC2::Route Properties: DestinationIpv6CidrBlock: '::/0' EgressOnlyInternetGatewayId: !Ref Ipv6EgressOnlyIgw RouteTableId: !Ref PrivateNatRouteTable
This configuration correctly specifies:
- The IPv6 destination CIDR block (
::/0) - A single target (the Egress-Only Internet Gateway)
- The route table ID
It's important to note that a route table cannot have the same destination (::/0) pointing to both an internet gateway and an egress-only internet gateway simultaneously. If you're trying to update an existing route table that already has an IPv6 route to an internet gateway, you'll need to remove that route first before adding the route to the egress-only internet gateway.
Sources
AWS::EC2::Route - AWS CloudFormation
AWS::EC2::LocalGatewayRoute - AWS CloudFormation
Add IPv6 support for your VPC - Amazon Virtual Private Cloud
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago

This worked for me and the issue was as stated, thank you.