aws ec2 assign-private-nat-gateway-address
Assigns private IPv4 addresses to a private NAT gateway. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To assign private IP addresses to your private NAT gateway
The following assign-private-nat-gateway-address example assigns two private IP addresses to the specified private NAT gateway.
aws ec2 assign-private-nat-gateway-address --nat-gateway-id nat-1234567890abcdef0 --private-ip-address-count 2Identify--nat-gateway-idThe ID of the NAT gateway.--private-ip-address-countThe number of private IP addresses to assign to the NAT gateway.Its output
{
"NatGatewayId": "nat-1234567890abcdef0",
"NatGatewayAddresses": [
{
"NetworkInterfaceId": "eni-0065a61b324d1897a",
"IsPrimary": false,
"Status": "assigning"
},
{
"NetworkInterfaceId": "eni-0065a61b324d1897a",
"IsPrimary": false,
"Status": "assigning"
}
]
}For more information, see NAT gateways in the Amazon VPC User Guide.
Options
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--nat-gateway-idThe ID of the NAT gateway.--private-ip-address-countThe number of private IP addresses to assign to the NAT gateway.--private-ip-addressesThe private IPv4 addresses you want to assign to the private NAT gateway.