If you no longer need a customer gateway, you can delete it. You can't delete a customer gateway that's being used in a Site-to-Site VPN connection.
To delete a customer gateway using the console
In the navigation pane, choose Customer gateways.
Select the customer gateway and choose Actions, Delete customer gateway.
When prompted for confirmation, enter
delete
and then choose Delete.
To delete a customer gateway using the command line or API
-
DeleteCustomerGateway (Amazon EC2 Query API)
-
delete-customer-gateway
(AWS CLI) -
Remove-EC2CustomerGateway (AWS Tools for Windows PowerShell)