

# Remove the association between a MACsec secret key and an Amazon Direct Connect connection
<a name="disassociate-key-connection"></a>

You can remove the association between the connection and the MACsec key using either the Amazon Direct Connect console or through the command-line or API.

**To remove an association between a connection and a MACsec key**

1. Open the **Amazon Direct Connect** console at [https://console.amazonaws.cn/directconnect/v2/home](https://console.amazonaws.cn/directconnect/v2/home).

1. 

1. In the left pane, choose **Connections**.

1. Select a connection, and then choose **View details**.

1. Select the MACsec secret to remove, and then choose **Disassociate key**.

1. In the confirmation dialog box, enter **disassociate**, and then choose **Disassociate**.

**To remove an association between a connection and a MACsec key using the command line or API**
+ [disassociate-mac-sec-key](https://docs.amazonaws.cn/cli/latest/reference/directconnect/disassociate-mac-sec-key.html) (Amazon CLI)
+ [DisassociateMacSecKey](https://docs.amazonaws.cn/directconnect/latest/APIReference/API__DisassociateMacSecKey.html) (Amazon Direct Connect API)