

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# `AWSConfigRemediation-EnableCWLoggingForSessionManager`
<a name="automation-aws-enable-cw-log-sm"></a>

 **Description** 

 `AWSConfigRemediation-EnableCWLoggingForSessionManager` Runbook 可讓 AWS Systems Manager Session Manager (Session Manager) 工作階段將輸出日誌儲存到 Amazon CloudWatch (CloudWatch) 日誌群組。

 [執行此自動化 （主控台）](https://console.aws.amazon.com/systems-manager/automation/execute/AWSConfigRemediation-EnableCWLoggingForSessionManager) 

**文件類型**

 自動化

**擁有者**

Amazon

**平台**

Linux、macOS、 Windows

**參數**
+ AutomationAssumeRole

  類型：字串

  描述：（必要） 允許 Systems Manager Automation 代表您執行動作的 (IAM) 角色的 AWS Identity and Access Management Amazon Resource Name (ARN)。
+ DestinationLogGroup

  類型：字串

  描述：（必要） CloudWatch 日誌群組的名稱。

**必要的 IAM 許可**

`AutomationAssumeRole` 參數需要下列動作才能成功使用 Runbook。
+  `ssm:StartAutomationExecution` 
+  `ssm:GetAutomationExecution` 
+  `ssm:GetDocument` 
+  `ssm:UpdateDocument` 
+  `ssm:CreateDocument` 
+  `ssm:UpdateDefaultDocumentVersion` 
+  `ssm:DescribeDocument` 

 **文件步驟** 
+  `aws:executeScript` - 接受 CloudWatch 日誌群組，以更新存放 Session Manager 工作階段輸出日誌偏好設定的文件，或在不存在時建立一個。