

• AWS Systems Manager CloudWatch 대시보드는 2026년 4월 30일 이후에는 더 이상 사용할 수 없습니다. 고객은 Amazon CloudWatch 콘솔을 계속 사용하여 현재와 마찬가지로 Amazon CloudWatch 대시보드를 보고, 생성하고, 관리할 수 있습니다. 자세한 내용은 [Amazon CloudWatch 대시보드 설명서](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)를 참조하세요.

# Session 문서 스키마
<a name="session-manager-schema"></a>

다음 정보는 Session 문서의 스키마 요소에 대해 설명합니다. AWS Systems Manager Session Manager는 Session 문서를 사용하여 표준 세션, 포트 전달 세션 또는 대화형 명령을 실행하는 세션 등 시작할 세션 유형을 결정합니다.

 [schemaVersion](#version)   
Session 문서의 스키마 버전입니다. Session 문서는 버전 1.0만 지원합니다.  
유형: 문자열  
필수 항목 여부: 예

 [description](#descript)   
Session 문서에 대해 지정하는 설명입니다. 예를 들면 “Session Manager로 포트 전달 세션을 시작하기 위한 문서“입니다.  
유형: 문자열  
필수 여부: 아니요

 [sessionType](#type)   
Session 문서가 설정하는 데 사용되는 세션 유형입니다.  
유형: 문자열  
필수 항목 여부: 예  
유효한 값: `InteractiveCommands` \| `NonInteractiveCommands` \| `Port` \| `Standard_Stream`

 [inputs](#in)   
이 Session 문서를 사용하여 설정된 세션에 사용할 세션 기본 설정입니다. 이 요소는 `Standard_Stream` 세션을 생성하는 데 사용되는 Session 문서에 필요합니다.  
유형: StringMap  
필수 여부: 아니요    
 [s3BucketName](#bucket)   
세션 종료 시 세션 로그를 보내려는 Amazon Simple Storage Service(Amazon S3) 버킷입니다.  
유형: 문자열  
필수 여부: 아니요  
 [s3KeyPrefix](#prefix)   
`s3BucketName` 입력에 지정한 Amazon S3 버킷으로 로그를 보낼 때 사용할 접두사입니다. Amazon S3에 저장된 객체에 공유 접두사 사용에 대한 자세한 내용은 *Amazon Simple Storage Service 사용 설명서*의 [S3 버킷에서 폴더를 어떻게 사용하나요?](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/using-folders.html)를 참조하세요.  
유형: 문자열  
필수 여부: 아니요  
 [s3EncryptionEnabled](#s3Encrypt)   
`true`로 설정하면 `s3BucketName` 입력에 지정한 Amazon S3 버킷을 암호화해야 합니다.  
유형: Boolean  
필수 여부: 예  
 [cloudWatchLogGroupName](#logGroup)   
세션 종료 시 세션 로그를 보내려는 Amazon CloudWatch Logs(CloudWatch Logs) 그룹의 이름입니다.  
유형: 문자열  
필수 여부: 아니요  
 [cloudWatchEncryptionEnabled](#cwEncrypt)   
`true`로 설정하면 `cloudWatchLogGroupName` 입력에 지정한 로그 그룹을 암호화해야 합니다.  
유형: Boolean  
필수 여부: 예  
 [cloudWatchStreamingEnabled](#cwStream)   
`true`로 설정하면 세션 데이터 로그의 연속 스트림이 `cloudWatchLogGroupName` 입력에 지정한 로그 그룹으로 전송됩니다. `false`로 설정하면 세션 로그가 세션 종료 시 `cloudWatchLogGroupName` 입력에 지정한 로그 그룹으로 전송됩니다.  
유형: Boolean  
필수 여부: 예  
 [kmsKeyId](#kms)   
로컬 클라이언트 시스템과 연결하는 Amazon Elastic Compute Cloud(Amazon EC2) 관리형 노드 간의 데이터를 추가로 암호화하는 데 사용할 AWS KMS key의 ID입니다.  
유형: 문자열  
필수 여부: 아니요  
 [runAsEnabled](#run)   
`true`로 설정하면 `runAsDefaultUser` 입력에 연결할 관리형 노드에 존재하는 사용자 계정을 지정해야 합니다. 그렇지 않으면 세션이 시작되지 않습니다. 기본적으로 세션은 AWS Systems Manager SSM Agent에서 생성된 `ssm-user` 계정을 사용하여 시작됩니다. 다음으로 실행 기능은 Linux 및 macOS 관리형 노드에 연결하는 경우에만 지원됩니다.  
유형: Boolean  
필수 여부: 예  
 [runAsDefaultUser](#runUser)   
`runAsEnabled` 입력이 `true`로 설정된 경우 Linux 및 macOS 관리형 노드에서 세션을 시작할 사용자 계정의 이름입니다. 이 입력에 대해 지정한 사용자 계정은 연결할 관리형 노드에 있어야 합니다. 그렇지 않으면 세션이 시작되지 않습니다. 사용할 OS 사용자 계정을 결정할 때 Session Manager는 IAM 사용자의 세션 태그의 `SSMSessionRunAs` 태그, 수임된 IAM 역할의 `SSMSessionRunAs` 태그, 마지막으로 세션 기본 설정의 이 `runAsDefaultUser` 값을 순서대로 확인합니다. 자세한 내용은 [Linux 및 macOS 관리형 노드에 대한 Run As 지원 활성화](session-preferences-run-as.md) 섹션을 참조하세요.  
유형: 문자열  
필수 여부: 아니요  
 [idleSessionTimeout](#timeout)   
세션이 종료되기 전에 허용할 비활성 시간입니다. 이 입력은 분 단위로 측정됩니다.  
유형: 문자열  
유효한 값은 1\~60입니다.  
필수 여부: 아니요  
 [maxSessionDuration](#maxDuration)   
세션이 종료되기 전에 허용할 최대 시간입니다. 이 입력은 분 단위로 측정됩니다.  
유형: 문자열  
유효한 값은 1\~1,440입니다.  
필수 여부: 아니요  
 [shellProfile](#shell)   
셸 기본 설정, 환경 변수, 작업 디렉터리 및 세션 시작 시 여러 명령 실행과 같이 세션 내에서 적용할 운영 체제별로 지정하는 기본 설정입니다.  
유형: StringMap  
필수 여부: 아니요    
 [windows](#win)   
Windows Server 관리형 노드의 세션에 대해 지정하는 쉘 기본 설정, 환경 변수, 작업 디렉터리 및 명령입니다.  
유형: 문자열  
필수 여부: 아니요  
 [linux](#lin)   
Linux 및 macOS 관리형 노드의 세션에 대해 지정하는 쉘 기본 설정, 환경 변수, 작업 디렉터리 및 명령입니다.  
유형: 문자열  
필수 여부: 아니요

 [parameters](#param)   
문서가 허용하는 파라미터를 정의하는 객체입니다. 문서 파라미터 정의에 대한 자세한 내용은 [최상위 데이터 요소](documents-syntax-data-elements-parameters.md#top-level)의 **파라미터**를 참조하세요. 자주 참조하는 파라미터의 경우에는 먼저 Systems Manager Parameter Store에 저장한 후 참조하는 것이 좋습니다. 이 문서 섹션에서는 `String` 및 `StringList` Parameter Store 파라미터를 참조할 수 있습니다. 이 문서 섹션에서는 `SecureString` Parameter Store 파라미터를 참조할 수 없습니다. 다음 형식을 사용하여 Parameter Store 파라미터를 참조할 수 있습니다.  

```
{{ssm:{{parameter-name}}}}
```
Parameter Store에 대한 자세한 내용은 [AWS Systems Manager Parameter Store](systems-manager-parameter-store.md) 섹션을 참조하세요.  
유형: StringMap  
필수 여부: 아니요

 [properties](#props)   
`StartSession` API 작업에 사용되는 값을 지정하는 객체입니다.  
`InteractiveCommands` 세션에 사용되는 Session 문서의 경우 속성 객체에는 지정한 운영 체제에서 실행할 명령이 포함됩니다. `runAsElevated` 부울 속성을 사용하여 명령이 `root`로 실행되는지도 판단할 수 있습니다. 자세한 내용은 [세션의 명령에 대한 액세스 제한](session-manager-restrict-command-access.md)을 참조하세요.  
`Port` 세션에 사용되는 Session 문서의 경우 속성 객체에는 트래픽이 리디렉션되어야 하는 포트 번호가 포함됩니다. 예를 들어 이 주제 뒷부분의 `Port` 유형 Session 문서 예를 참조하세요.  
유형: StringMap  
필수 여부: 아니요

`Standard_Stream` 유형 Session 문서 예

------
#### [ YAML ]

```
---
schemaVersion: '1.0'
description: Document to hold regional settings for Session Manager
sessionType: Standard_Stream
inputs:
  s3BucketName: ''
  s3KeyPrefix: ''
  s3EncryptionEnabled: true
  cloudWatchLogGroupName: ''
  cloudWatchEncryptionEnabled: true
  cloudWatchStreamingEnabled: true
  kmsKeyId: ''
  runAsEnabled: true
  runAsDefaultUser: ''
  idleSessionTimeout: '20'
  maxSessionDuration: '60'
  shellProfile:
    windows: ''
    linux: ''
```

------
#### [ JSON ]

```
{
    "schemaVersion": "1.0",
    "description": "Document to hold regional settings for Session Manager",
    "sessionType": "Standard_Stream",
    "inputs": {
        "s3BucketName": "",
        "s3KeyPrefix": "",
        "s3EncryptionEnabled": true,
        "cloudWatchLogGroupName": "",
        "cloudWatchEncryptionEnabled": true,
        "cloudWatchStreamingEnabled": true,
        "kmsKeyId": "",
        "runAsEnabled": true,
        "runAsDefaultUser": "",
        "idleSessionTimeout": "20",
        "maxSessionDuration": "60",
        "shellProfile": {
            "windows": "date",
            "linux": "pwd;ls"
        }
    }
}
```

------

`InteractiveCommands` 유형 Session 문서 예

------
#### [ YAML ]

```
---
schemaVersion: '1.0'
description: Document to view a log file on a Linux instance
sessionType: InteractiveCommands
parameters:
  logpath:
    type: String
    description: The log file path to read.
    default: "/var/log/amazon/ssm/amazon-ssm-agent.log"
    allowedPattern: "^[a-zA-Z0-9-_/]+(.log)$"
properties:
  linux:
    commands: "tail -f {{ logpath }}"
    runAsElevated: true
```

------
#### [ JSON ]

```
{
    "schemaVersion": "1.0",
    "description": "Document to view a log file on a Linux instance",
    "sessionType": "InteractiveCommands",
    "parameters": {
        "logpath": {
            "type": "String",
            "description": "The log file path to read.",
            "default": "/var/log/amazon/ssm/amazon-ssm-agent.log",
            "allowedPattern": "^[a-zA-Z0-9-_/]+(.log)$"
        }
    },
    "properties": {
        "linux": {
            "commands": "tail -f {{ logpath }}",
            "runAsElevated": true
        }
    }
}
```

------

`Port` 유형 Session 문서 예

------
#### [ YAML ]

```
---
schemaVersion: '1.0'
description: Document to open given port connection over Session Manager
sessionType: Port
parameters:
  paramExample:
    type: string
    description: document parameter
properties:
  portNumber: {{anyPortNumber}}
```

------
#### [ JSON ]

```
{
    "schemaVersion": "1.0",
    "description": "Document to open given port connection over Session Manager",
    "sessionType": "Port",
    "parameters": {
        "paramExample": {
            "type": "string",
            "description": "document parameter"
        }
    },
    "properties": {
        "portNumber": "anyPortNumber"
    }
}
```

------

특수 문자가 있는 Session 문서 예

------
#### [ YAML ]

```
---
schemaVersion: '1.0'
description: Example document with quotation marks
sessionType: InteractiveCommands
parameters:
  Test:
    type: String
    description: Test Input
    maxChars: 32
properties:
  windows:
    commands: |
        $Test = '{{ Test }}'
        $myVariable = \"Computer name is $env:COMPUTERNAME\"
        Write-Host "Test variable: $myVariable`.`nInput parameter: $Test"
    runAsElevated: false
```

------
#### [ JSON ]

```
{
   "schemaVersion":"1.0",
   "description":"Test document with quotation marks",
   "sessionType":"InteractiveCommands",
   "parameters":{
      "Test":{
         "type":"String",
         "description":"Test Input",
         "maxChars":32
      }
   },
   "properties":{
      "windows":{
         "commands":[
            "$Test = '{{ Test }}'",
            "$myVariable = \\\"Computer name is $env:COMPUTERNAME\\\"",
            "Write-Host \"Test variable: $myVariable`.`nInput parameter: $Test\""
         ],
         "runAsElevated":false
      }
   }
}
```

------