

# Step 8: Cleanup
<a name="route-server-tutorial-cleanup"></a>

The building portion of the tutorial is complete. Complete the steps in this section to remove the VPC Route Server components that you created.

**7.1: Withdraw BGP advertisement on the devices**

Withdrawing BGP advertisement on the devices in your subnets is outside the scope of this guide. Refer to your third-party vendor for your BGP configurations as needed.

**7.2: Disable route server propagation**

Use the following procedure to disable route server propagation.

------
#### [ AWS Management Console ]

****

1. Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

1. Select the route server for which you want to disable propagation.

1. Choose **Actions > Modify route server**.

1. Choose the **Propagations** tab in the route server details panel.

1. Choose the propagation you want to disable and then choose **Disable propagation**.

1. In the dialog box, choose **Disable route server propagation**.

------
#### [ Command line ]

1. Disable propagation:

   ```
   aws ec2 disable-route-server-route-propagation --route-table-id rtb-1 --route-server-id rs-1
   ```

1. Confirm that the propagation has been deleted:

   ```
   aws ec2 get-route-server-route-propagations --route-server-id rs-1 [--route-table-id rtb-1]
   ```

------

**7.3: Delete route server peers**

Use the following procedure to delete route server peers.

------
#### [ AWS Management Console ]

****

1. Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

1. In the navigation path, choose **Route servers** > **Route server peers**.

1. Select a route server peer.

1. Choose **Actions** > **Delete route server peer**.

------
#### [ Command line ]

1. Delete peers:

   ```
   aws ec2 delete-route-server-peer --route-server-peer-id rsp-1
   ```

1. Confirm the deletion:

   ```
   aws ec2 describe-route-server-peers [--route-server-peer-ids rsp-1] [--filters Key=RouteServerId|RouteServerEndpointId|VpcId]
   ```

------

**7.4: Delete route server endpoints**

Use the following procedure to delete route server endpoints.

------
#### [ AWS Management Console ]

****

1. Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

1. Select the route server for which you want to delete endpoints.

1. Choose **Route server endpoints**.

1. Select the endpoint and choose **Actions** > **Delete route server endpoint**.

1. Enter delete and choose **Delete**.

------
#### [ Command line ]

1. Describe endpoints:

   ```
   aws ec2 describe-route-server-endpoints
   ```

1. Delete route server endpoints:

   ```
   aws ec2 delete-route-server-endpoint --route-server-endpoint-id rse-1
   ```

1. Confirm that the endpoints have been deleted:

   ```
   aws ec2 describe-route-server-endpoints [--route-server-endpoint-ids rsp-1] [--filters Key=RouteServerId|VpcId|SubnetId]
   ```

------

**7.5: Disassociate route server from VPC**

Use the following procedure to disassociate the route server from the VPC.

------
#### [ AWS Management Console ]

****

1. Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

1. Select the route server for which you want to disassociate.

1. Choose **Association**.

1. Choose **Disassociate route server**.

1. Confirm the changes that will be made and choose **Disassociate route server**.

------
#### [ Command line ]

1. Disassociate route server from the VPC:

   ```
   aws ec2 disassociate-route-server --route-server-id rs-1 --vpc-id vpc-1
   ```

1. Confirm the disassociation:

   ```
   aws ec2 get-route-server-associations --route-server-id rs-1
   ```

------

**7.6 Delete route server**

Use the following procedure to delete the route server.

------
#### [ AWS Management Console ]

****

1. Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

1. Select the route server to delete.

1. Choose **Actions** > **Delete route server**.

1. Enter *delete* and choose **Delete**.

------
#### [ Command line ]

1. Delete route server:

   ```
   aws ec2 delete-route-server --route-server-id rs-1
   ```

1. Confirm the deletion:

   ```
   aws ec2 describe-route-servers [--route-server-ids rs-1] [--filters Key=VpcId]
   ```

------