aws ec2 delete-nat-gateway
Deletes the specified NAT gateway. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To delete a NAT gateway
The following delete-nat-gateway example deletes NAT gateway nat-04ae55e711cec5680.
aws ec2 delete-nat-gateway --nat-gateway-id nat-04ae55e711cec5680Identify--nat-gateway-idThe ID of the NAT gateway.Its output
{
"NatGatewayId": "nat-04ae55e711cec5680"
}For more information, see Work with 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.