

• Amazon Systems Manager CloudWatch 控制面板在 2026 年 4 月 30 日之后将不再可用。客户可以像现在一样继续使用 Amazon CloudWatch 控制台来查看、创建和管理其 Amazon CloudWatch 控制面板。有关更多信息，请参阅 [Amazon CloudWatch 控制面板文档](https://docs.amazonaws.cn/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

# 使用 Run Command 来关闭 Kernel Live Patching
<a name="disable-klp"></a>

要关闭 Kernel Live Patching，您可以在托管式节点上运行 `yum` 命令，也可以使用 Run Command 以及自定义 SSM 文档 `AWS-ConfigureKernelLivePatching`。

**注意**  
如果您不再需要使用内核实时修补，可以随时关闭它。在大多数情况下，不需要关闭该功能。

有关通过直接在托管式节点上运行 `yum` 命令来关闭 Kernel Live Patching 的信息，请参阅《Amazon EC2 用户指南》**中的[启用 Kernel Live Patching](https://docs.amazonaws.cn/AWSEC2/latest/UserGuide/al2-live-patching.html#al2-live-patching-enable)。

**注意**  
关闭 Kernel Live Patching 时，该进程会卸载 Kernel Live Patching 插件，然后重启托管式节点。

**使用 Run Command 来关闭 Kernel Live Patching (控制台)**

1. 访问 [https://console.aws.amazon.com/systems-manager/](https://console.amazonaws.cn/systems-manager/)，打开 Amazon Systems Manager 控制台。

1. 在导航窗格中，选择 **Run Command**。

1. 选择 **Run command（运行命令）**。

1. 在**命令文档** 列表中，请选择 SSM 文档 `AWS-ConfigureKernelLivePatching`。

1. 在 **Command parameters (命令参数)** 部分中，为必需的参数指定值。

1. 有关使用此页上的其余控件的信息，请参阅 [从控制台运行命令](running-commands-console.md)。

1. 选择**运行**。

**关闭 Kernel Live Patching (Amazon CLI)**
+ 运行类似于下面的命令。

------
#### [ Linux & macOS ]

  ```
  aws ssm send-command \
      --document-name "AWS-ConfigureKernelLivePatching" \
      --targets "Key=instanceIds,Values={{instance-id}}" \
      --parameters "EnableOrDisable=Disable"
  ```

------
#### [ Windows Server ]

  ```
  aws ssm send-command ^
      --document-name "AWS-ConfigureKernelLivePatching" ^
      --targets "Key=instanceIds,Values={{instance-id}}" ^
      --parameters "EnableOrDisable=Disable"
  ```

------

  将 {{instance-id}} 替换为要关闭该功能的 Amazon Linux 2 托管式节点的 ID，例如 i-02573cafcfEXAMPLE。要在多个托管式节点上关闭该功能，您可以使用以下任一格式。
  + `--targets "Key=instanceids,Values={{instance-id1}},{{instance-id2}}"`
  + `--targets "Key=tag:{{tag-key}},Values={{tag-value}}"`

  有关可以在命令中使用的其他选项的信息，请参阅《Amazon CLI Command Reference》**中的 [https://docs.amazonaws.cn/cli/latest/reference/ssm/send-command.html](https://docs.amazonaws.cn/cli/latest/reference/ssm/send-command.html)。