Command 문서 플러그인 참조 - AWS Systems Manager

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Command 문서 플러그인 참조

이 참조에서는 AWS Systems Manager (SSM) Command 유형 문서에서 지정할 수 있는 플러그인에 대해 설명합니다. 이러한 플러그인은 Automation 작업을 사용하는 SSM Automation 실행서에서는 사용할 수 없습니다. AWS Systems Manager 자동화 작업에 대한 자세한 내용은 을 참조하십시오Systems Manager Automation 작업 참조.

Systems Manager는 SSM 문서의 콘텐츠를 읽어 관리형 인스턴스에서 수행할 작업을 결정합니다. 각 문서에는 코드 실행 섹션이 포함됩니다. 문서의 스키마 버전에 따라 이 코드 실행 섹션이 하나 이상의 플러그인 또는 단계를 포함할 수 있습니다. 이 도움말 주제의 목적을 위해, 플러그인 및 단계를 플러그인으로 부릅니다. 이 섹션에는 각 Systems Manager 플러그인에 대한 정보가 포함되어 있습니다. 문서 생성 및 스키마 버전 간 차이를 비롯해 문서에 대한 자세한 내용은 AWS Systems Manager Documents 섹션을 참조하세요.

참고

여기서 설명하는 일부 플러그인은 Windows Server 인스턴스 또는 Linux 인스턴스 중 하나에서만 실행할 수 있습니다. 플러그인마다 플랫폼 종속성이 표시되어 있습니다.

다음 문서 플러그인은 macOS용 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스에서 지원됩니다.

  • aws:refreshAssociation

  • aws:runShellScript

  • aws:runPowerShellScript

  • aws:softwareInventory

  • aws:updateSsmAgent

공유 입력

(SSM Agent 버전 3.0.502 이상 한정) 모든 플러그 인은 다음 입력을 사용할 수 있습니다.

finallyStep

문서를 실행할 마지막 단계입니다. 이 입력이 단계에 대해 정의된 경우 onFailure 또는 onSuccess 입력에 지정된 exit 값보다 우선합니다. 이 입력이 있는 단계가 예상대로 실행되려면 해당 단계가 문서의 mainSteps에 정의된 마지막 단계여야 합니다.

타입: 부울

유효한 값: true | false

필수 항목 여부: 아니요

onFailure

exit 값이 있는 플러그인에 대해 이 입력을 지정하고 단계가 실패하면 단계 상태는 실패를 반영하고 문서는 finallyStep이 정의되지 않는 한 나머지 단계를 실행하지 않습니다. successAndExit 값이 있는 플러그인에 대해 이 입력을 지정하고 단계가 실패하면 단계 상태는 성공으로 표시되고 문서는 finallyStep이 정의되지 않는 한 나머지 단계를 실행하지 않습니다.

타입: 문자열

유효한 값: exit | successAndExit

필수 항목 여부: 아니요

onSuccess

플러그인에 대해 이 입력을 지정하고 단계가 성공적으로 실행되면 finallyStep이 정의되지 않는 한 문서는 나머지 단계를 실행하지 않습니다.

타입: 문자열

유효값: exit

필수 항목 여부: 아니요

YAML
--- schemaVersion: '2.2' description: Shared inputs example parameters: customDocumentParameter: type: String description: Example parameter for a custom Command-type document. mainSteps: - action: aws:runDocument name: runCustomConfiguration inputs: documentType: SSMDocument documentPath: "yourCustomDocument" documentParameters: '"documentParameter":{{customDocumentParameter}}' onSuccess: exit - action: aws:runDocument name: ifConfigurationFailure inputs: documentType: SSMDocument documentPath: "yourCustomRepairDocument" onFailure: exit - action: aws:runDocument name: finalConfiguration inputs: documentType: SSMDocument documentPath: "yourCustomFinalDocument" finallyStep: true
JSON
{ "schemaVersion": "2.2", "description": "Shared inputs example", "parameters": { "customDocumentParameter": { "type": "String", "description": "Example parameter for a custom Command-type document." } }, "mainSteps":[ { "action": "aws:runDocument", "name": "runCustomConfiguration", "inputs": { "documentType": "SSMDocument", "documentPath": "yourCustomDocument", "documentParameters": "\"documentParameter\":{{customDocumentParameter}}", "onSuccess": "exit" } }, { "action": "aws:runDocument", "name": "ifConfigurationFailure", "inputs": { "documentType": "SSMDocument", "documentPath": "yourCustomRepairDocument", "onFailure": "exit" } }, { "action": "aws:runDocument", "name":"finalConfiguration", "inputs": { "documentType": "SSMDocument", "documentPath": "yourCustomFinalDocument", "finallyStep": true } } ] }

aws:applications

EC2 인스턴스에서 애플리케이션을 설치, 복구 또는 제거합니다. 이 플러그인은 Windows Server 운영 체제에서만 실행됩니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:applications plugin parameters: source: description: "(Required) Source of msi." type: String mainSteps: - action: aws:applications name: example inputs: action: Install source: "{{ source }}"
JSON
{ "schemaVersion":"2.2", "description":"aws:applications", "parameters":{ "source":{ "description":"(Required) Source of msi.", "type":"String" } }, "mainSteps":[ { "action":"aws:applications", "name":"example", "inputs":{ "action":"Install", "source":"{{ source }}" } } ] }

스키마 1.2

YAML
--- runtimeConfig: aws:applications: properties: - id: 0.aws:applications action: "{{ action }}" parameters: "{{ parameters }}" source: "{{ source }}" sourceHash: "{{ sourceHash }}"
JSON
{ "runtimeConfig":{ "aws:applications":{ "properties":[ { "id":"0.aws:applications", "action":"{{ action }}", "parameters":"{{ parameters }}", "source":"{{ source }}", "sourceHash":"{{ sourceHash }}" } ] } } }

속성

작업

수행할 작업입니다.

형식: 열거형

유효한 값: Install | Repair | Uninstall

필수 항목 여부: 예

파라미터

설치 프로그램에 대한 파라미터입니다.

타입: 문자열

필수 항목 여부: 아니요

source

애플리케이션용 .msi 파일의 URL입니다.

타입: 문자열

필수 항목 여부: 예

sourceHash

.msi 파일의 SHA256 해시입니다.

타입: 문자열

필수 항목 여부: 아니요

aws:cloudWatch

Amazon CloudWatch 또는 Amazon CloudWatch Logs에서 Windows Server 데이터를 내보내고 CloudWatch 지표를 사용하여 데이터를 모니터링합니다. 이 플러그인은 Windows Server 운영 체제에서만 실행됩니다. Amazon Elastic Compute Cloud (Amazon EC2) 와의 CloudWatch 통합을 구성하는 방법에 대한 자세한 내용은 에이전트를 사용하여 Amazon EC2 인스턴스 및 온프레미스 서버에서 지표 및 로그 수집을 참조하십시오. CloudWatch

중요

Amazon CloudWatch Logs로 로그 데이터를 전송하는 도구로 통합 CloudWatch 에이전트가 SSM Agent 대체되었습니다. SSM Agent aws:cloudWatch 플러그인은 지원되지 않습니다. 로그 수집 프로세스에는 통합 CloudWatch 에이전트만 사용하는 것이 좋습니다. 자세한 정보는 다음 주제를 참조하십시오.

다음의 데이터 형식을 내보내고 모니터링할 수 있습니다.

ApplicationEventLog

애플리케이션 이벤트 로그 데이터를 Logs로 CloudWatch 전송합니다.

CustomLogs

모든 텍스트 기반 로그 파일을 Amazon CloudWatch Logs로 보냅니다. CloudWatch 플러그인은 로그 파일의 핑거프린트를 생성합니다. 그러면 시스템이 각 지문에 데이터 오프셋을 연결합니다. 플러그인은 변경 사항이 있을 경우 파일을 업로드하고, 오프셋을 기록하고, 지문에 오프셋을 연결합니다. 이 방법은 사용자가 플러그인을 설정하고, 대량 파일을 포함하는 디렉터리에 서비스를 연결하고, 시스템이 모든 파일을 업로드하는 상황을 방지하기 위해 사용됩니다.

주의

애플리케이션이 폴링 도중 로그를 자르거나 정리하려 할 경우 LogDirectoryPath에 지정된 모든 로그에서 항목이 손실될 수 있음을 유의하십시오. 예를 들어 로그 파일 크기를 제한하려는 경우, 해당 제한에 도달하면 새 로그 파일을 생성한 후 새 파일에 데이터를 계속 기록합니다.

ETW

Windows용 이벤트 추적 (ETW) 데이터를 로그로 CloudWatch 보냅니다.

IIS

IIS 로그 데이터를 로그로 CloudWatch 보냅니다.

PerformanceCounter

에 Windows 성능 카운터를 CloudWatch 보냅니다. CloudWatch 지표로 업로드할 여러 카테고리를 선택할 수 있습니다. 업로드하려는 각 성능 카운터에 대해 고유한 ID (예: "PerformanceCounter2"," PerformanceCounter 3" 등) 로 PerformanceCounter섹션을 생성하고 해당 속성을 구성합니다.

참고

AWS Systems Manager SSM Agent또는 CloudWatch 플러그인을 중지하면 성능 카운터 데이터가 로그인되지 않습니다. CloudWatch 이 동작은 사용자 지정 로그나 Windows 이벤트 로그와 다릅니다. 사용자 지정 로그와 Windows 이벤트 로그는 성능 카운터 데이터를 보존하고 CloudWatch After SSM Agent 또는 CloudWatch 플러그인을 사용할 수 있는 상태로 업로드합니다.

SecurityEventLog

보안 이벤트 로그 데이터를 CloudWatch Logs로 보냅니다.

SystemEventLog

시스템 이벤트 로그 데이터를 CloudWatch Logs로 보냅니다.

데이터에 다음 대상을 정의할 수 있습니다.

CloudWatch

성능 카운터 지표 데이터가 보내지는 대상입니다. 고유한 ID (예: "CloudWatch2", CloudWatch 3" 등) 가 있는 섹션을 더 추가하고 새 ID마다 다른 지역을 지정하여 동일한 데이터를 다른 위치로 전송할 수 있습니다.

CloudWatchLogs

로그 데이터가 보내지는 대상입니다. 고유한 ID가 있는 섹션을 더 추가하고 (예: "CloudWatchLogs2", CloudWatchLogs 3" 등) 새 ID마다 다른 지역을 지정하여 동일한 데이터를 다른 위치로 전송할 수 있습니다.

구문

"runtimeConfig":{ "aws:cloudWatch":{ "settings":{ "startType":"{{ status }}" }, "properties":"{{ properties }}" } }

설정 및 속성

AccessKey

사용자의 액세스 키 ID입니다. 이 속성은 IAM 역할을 사용해 인스턴스를 시작하지 않은 한 필수입니다. 이 속성은 SSM과 함께 사용할 수 없습니다.

타입: 문자열

필수 항목 여부: 아니요

CategoryName

Performance Monitor의 성능 카운터 범주입니다.

타입: 문자열

필수 항목 여부: 예

CounterName

Performance Monitor의 성능 카운터 이름입니다.

타입: 문자열

필수 항목 여부: 예

CultureName

타임스탬프가 기록되는 로캘입니다. CultureName이 비어 있는 경우 인스턴스에서 사용하는 것과 동일한 로케일이 기본값으로 사용됩니다. Windows Server

타입: 문자열

유효한 값: 지원되는 값 목록은 Microsoft 웹 사이트에서 National Language Support(NLS)를 참조하십시오. div, div-MV, hu, hu-HU 값은 지원되지 않습니다.

필수 항목 여부: 아니요

DimensionName

Amazon CloudWatch 메트릭의 측정기준입니다. DimensionName를 지정할 경우 DimensionValue을 지정해야 합니다. 이런 파라미터는 메트릭 나열 시 또 다른 보기를 제공합니다. 특정 차원에 속하는 모든 지표를 볼 수 있도록 여러 지표에서 같은 차원을 사용할 수 있습니다.

타입: 문자열

필수 항목 여부: 아니요

DimensionValue

Amazon CloudWatch 메트릭의 차원 값입니다.

타입: 문자열

필수 항목 여부: 아니요

인코딩

사용할 파일 인코딩입니다(예: UTF-8). 표시 이름이 아니라 인코딩 이름을 사용하세요.

타입: 문자열

유효한 값: 지원되는 값 목록은 Microsoft Learn Library의 Encoding Class를 참조하세요.

필수 항목 여부: 예

필터

로그 이름의 접두사입니다. 모든 파일을 모니터링하려면 이 파라미터를 공백으로 둡니다.

타입: 문자열

유효한 값: 지원되는 값 목록은 MSDN 라이브러리의 FileSystemWatcherFilter 속성을 참조하십시오.

필수 항목 여부: 아니요

흐름

업로드할 각 데이터 유형과 데이터 (CloudWatch 또는 CloudWatch 로그) 의 대상 예를 들어 에 정의된 성능 카운터를 에서 정의된 CloudWatch 대상으로 "Id": "PerformanceCounter" 보내려면 CloudWatch""Id": "CloudWatch"PerformanceCounter, “를 입력합니다. 마찬가지로 사용자 지정 로그, ETW 로그 및 시스템 CloudWatch 로그를 에 정의된 로그 대상으로 보내려면 “(ETW)"Id": "ETW", CloudWatchLogs “를 입력합니다. 또한, 같은 성능 카운터 또는 로그 파일을 두 개 이상의 대상으로 보낼 수 있습니다. 예를 들어, "Id": "CloudWatchLogs" 및 에서 정의한 서로 다른 두 대상으로 애플리케이션 로그를 보내려면 ""Id": "CloudWatchLogs2", (ApplicationEventLogCloudWatchLogs, CloudWatchLogs 2) “를 입력합니다.

타입: 문자열

유효한 값(원본): ApplicationEventLog | CustomLogs | ETW | PerformanceCounter | SystemEventLog | SecurityEventLog

유효한 값(대상): CloudWatch | CloudWatchLogs | CloudWatchn | CloudWatchLogsn

필수 항목 여부: 예

FullName

구성 요소의 전체 이름입니다.

타입: 문자열

필수 항목 여부: 예

Id

데이터 원본 또는 대상을 식별합니다. 이 식별자는 구성 파일 내에서 고유해야 합니다.

타입: 문자열

필수 항목 여부: 예

InstanceName

성능 카운터 인스턴스의 이름입니다. 각 성능 카운터 구성 요소가 메트릭을 하나씩만 지원하므로, 모든 인스턴스를 나타내기 위해 별표(*)를 사용하지 않도록 합니다. 하지만 _Total을 사용할 수는 있습니다.

타입: 문자열

필수 항목 여부: 예

수준

CloudWatchAmazon으로 전송할 메시지 유형

타입: 문자열

유효 값:

  • 1 - 오류 메시지만 업로드됩니다.

  • 2 - 경고 메시지만 업로드됩니다.

  • 4 - 정보 메시지만 업로드됩니다.

이들 값을 적절히 더하여 두 가지 이상의 메시지 유형을 포함할 수 있습니다. 예를 들어 3은 오류 메시지(1)와 경고 메시지(2)가 포함된다는 의미입니다. 값 7은 오류 메시지(1), 경고 메시지(2) 및 정보 메시지(4)가 포함된다는 의미입니다.

필수 항목 여부: 예

참고

Windows 보안 로그는 수준을 7로 설정해야 합니다.

LineCount

로그 파일을 식별하는 헤더의 행 수입니다. 예를 들어 IIS 로그 파일에 있는 헤더들은 사실상 동일합니다. 3을 입력하면 로그 파일 헤더에서 처음 나오는 세 줄을 읽어 식별하는 식입니다. IIS 로그 파일에서 세 번째 줄은 날짜와 타임스탬프(로그 파일 간에 차이가 있음)입니다.

유형: 정수

필수 항목 여부: 아니요

LogDirectoryPath

대상 CustomLogs: EC2 인스턴스에서 로그가 저장되는 경로입니다. IIS 로그의 경우 개별 사이트의 IIS 로그가 저장되는 폴더입니다 (예: C:\\ inetpub\\ logs\\LogFiles\ W3SVC n). IIS 로그에는 W3C 로그 형식만 지원됩니다. IIS, NCSA 및 사용자 정의 형식은 지원되지 않습니다.

타입: 문자열

필수 항목 여부: 예

LogGroup

로그 그룹의 이름. 이 이름은 콘솔의 로그 그룹 화면에 표시됩니다. CloudWatch

타입: 문자열

필수 항목 여부: 예

LogName

로그 파일의 이름입니다.

  1. 로그 이름을 찾으려면 이벤트 뷰어의 탐색 창에서 [애플리케이션 및 서비스 로그(Applications and Services Logs)]를 선택합니다.

  2. 로그 목록에서 업로드하려는 로그(예: Microsoft>Windows>Backup>Operational)를 마우스 오른쪽 버튼으로 클릭한 후 [사용자 정의 뷰 생성(Create Custom View)]을 선택합니다.

  3. [사용자 정의 뷰 생성(Create Custom View)] 대화 상자에서 XML 탭을 선택합니다. LogName는 <경로 선택=> 태그에 있습니다 (예:). Microsoft-Windows-Backup 이 텍스트를 매개변수에 복사합니다. LogName

타입: 문자열

유효한 값: Application | Security | System | Microsoft-Windows-WinINet/Analytic

필수 항목 여부: 예

LogStream

대상 로그 스트림입니다. 기본값인 {instance_id}를 사용하는 경우 이 인스턴스의 인스턴스 ID가 로그 스트림 이름으로 사용됩니다.

타입: 문자열

유효한 값: {instance_id} | {hostname} | {ip_address} <log_stream_name>

아직 존재하지 않는 로그 스트림 이름을 입력하면 CloudWatch Logs가 자동으로 이름을 생성합니다. 리터럴 문자열이나 사전 정의된 변수({instance_id}, {hostname}, {ip_address}) 또는 세 변수 모두의 조합을 사용하여 로그 스트림 이름을 정의할 수 있습니다.

이 매개변수에 지정된 로그 스트림 이름은 CloudWatch 콘솔의 로그 그룹 > Streams for < YourLogStream > 화면에 표시됩니다.

필수 항목 여부: 예

MetricName

성능 데이터를 포함하려는 CloudWatch 지표입니다.

참고

이름에 특수 문자를 사용할 수 없습니다. 사용하면 측정치 및 연결된 경보가 작동하지 않을 수 있습니다.

타입: 문자열

필수 항목 여부: 예

NameSpace

성능 카운터 데이터가 기록될 지표 네임스페이스입니다.

타입: 문자열

필수 항목 여부: 예

PollInterval

새 성능 카운터 및 로그 데이터가 업로드되기 전에 경과해야 하는 시간(초)입니다.

타입: 정수

유효한 값: 이 값을 5초 이상으로 설정합니다. 15초(00:00:15)를 권장합니다.

필수 항목 여부: 예

리전

로그 데이터를 전송하려는 AWS 리전 위치. 로그 데이터를 보내는 다른 리전으로 성능 카운터를 보낼 수 있지만, 이 파라미터를 인스턴스가 실행 중인 것과 같은 리전으로 설정하는 것이 좋습니다.

타입: 문자열

유효한 값: Systems Manager와 CloudWatch 로그에서 모두 AWS 리전 지원하는 지역 ID (예: us-east-2eu-west-1,,) ap-southeast-1 각 서비스가 AWS 리전 지원하는 목록은 의 Amazon CloudWatch Logs 서비스 엔드포인트Systems Manager 서비스 엔드포인트를 참조하십시오. Amazon Web Services 일반 참조

필수 항목 여부: 예

SecretKey

보안 액세스 키입니다. 이 속성은 IAM 역할을 사용해 인스턴스를 시작하지 않은 한 필수입니다.

타입: 문자열

필수 항목 여부: 아니요

startType

인스턴스를 켜거나 끕니다 CloudWatch .

타입: 문자열

유효한 값: Enabled | Disabled

필수 항목 여부: 예

TimestampFormat

사용하려는 타임스탬프 형식입니다. 지원되는 값 목록은 MSDN 라이브러리에서 Custom Date and Time Format Strings 항목을 참조하십시오.

타입: 문자열

필수 항목 여부: 예

TimeZoneKind

로그의 타임스탬프에 시간대 정보가 포함되어 있지 않을 때 시간대 정보를 제공합니다. 이 파라미터를 공란으로 두고 타임스탬프에 시간대 정보가 포함되지 않은 경우 CloudWatch 로그는 현지 시간대로 기본 설정됩니다. 타임스탬프에 표준 시간대 정보가 이미 포함되어 있는 경우 이 파라미터는 무시됩니다.

타입: 문자열

유효한 값: Local | UTC

필수 항목 여부: 아니요

단위

지표의 측정 단위입니다.

타입: 문자열

유효한 값: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None

필수 항목 여부: 예

aws:configureDocker

(스키마 버전 2.0 이상) 컨테이너 및 도커에서 사용할 인스턴스를 구성합니다. 이 플러그인은 Linux 및 Windows Server 운영 체제에서 지원됩니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:configureDocker parameters: action: description: "(Required) The type of action to perform." type: String default: Install allowedValues: - Install - Uninstall mainSteps: - action: aws:configureDocker name: configureDocker inputs: action: "{{ action }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:configureDocker plugin", "parameters": { "action": { "description": "(Required) The type of action to perform.", "type": "String", "default": "Install", "allowedValues": [ "Install", "Uninstall" ] } }, "mainSteps": [ { "action": "aws:configureDocker", "name": "configureDocker", "inputs": { "action": "{{ action }}" } } ] }

입력

작업

수행할 작업의 유형입니다.

형식: 열거형

유효한 값: Install | Uninstall

필수 항목 여부: 예

aws:configurePackage

(스키마 버전 2.0 이상) 패키지를 설치하거나 제거합니다. AWS Systems Manager Distributor 최신 버전, 기본 버전 또는 지정한 패키지 버전을 설치할 수 있습니다. 에서 제공하는 패키지도 AWS 지원됩니다. 이 플러그인은 Windows Server 및 Linux 운영 체제에서 실행해야 하지만 사용 가능한 일부 패키지는 Linux 운영 체제에서 지원되지 않습니다.

사용 가능한 AWS 패키지는 다음과 Windows Server 같습니다. AWSPVDriverAWSNVMe, AwsEnaNetworkDriverAwsVssComponents,AmazonCloudWatchAgent,CodeDeployAgent,, AWSSupport-EC2Rescue.

Linux 운영 체제에 사용할 수 있는 AWS 패키지는 다음과 같습니다. AmazonCloudWatchAgentCodeDeployAgent, 및AWSSupport-EC2Rescue.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:configurePackage parameters: name: description: "(Required) The name of the AWS package to install or uninstall." type: String action: description: "(Required) The type of action to perform." type: String default: Install allowedValues: - Install - Uninstall ssmParameter: description: "(Required) Argument stored in Parameter Store." type: String default: "{{ ssm:parameter_store_arg }}" mainSteps: - action: aws:configurePackage name: configurePackage inputs: name: "{{ name }}" action: "{{ action }}" additionalArguments: "{\"SSM_parameter_store_arg\": \"{{ ssmParameter }}\", \"SSM_custom_arg\": \"myValue\"}"
JSON
{ "schemaVersion": "2.2", "description": "aws:configurePackage", "parameters": { "name": { "description": "(Required) The name of the AWS package to install or uninstall.", "type": "String" }, "action": { "description": "(Required) The type of action to perform.", "type": "String", "default": "Install", "allowedValues": [ "Install", "Uninstall" ] }, "ssmParameter": { "description": "(Required) Argument stored in Parameter Store.", "type": "String", "default": "{{ ssm:parameter_store_arg }}" } }, "mainSteps": [ { "action": "aws:configurePackage", "name": "configurePackage", "inputs": { "name": "{{ name }}", "action": "{{ action }}", "additionalArguments": "{\"SSM_parameter_store_arg\": \"{{ ssmParameter }}\", \"SSM_custom_arg\": \"myValue\"}" } } ] }

입력

이름

설치 또는 제거할 AWS 패키지의 이름. AWSPVDriver, AwsEnaNetworkDriver, AwsVssComponents, AmazonCloudWatchAgent 등의 패키지를 사용할 수 있습니다.

타입: 문자열

필수 항목 여부: 예

작업

패키지를 설치 또는 제거합니다.

형식: 열거형

유효한 값: Install | Uninstall

필수 항목 여부: 예

installationType

수행할 설치 유형입니다. Uninstall and reinstall을 지정하면 패키지가 완전히 제거되었다가 다시 설치됩니다. 재설치가 완료될 때까지 애플리케이션을 사용할 수 없습니다. In-place update를 지정하면 업데이트 스크립트에서 제공한 지침에 따라 새 파일이나 변경된 파일만 기존 설치에 추가됩니다. 애플리케이션은 업데이트 프로세스 전체에서 사용할 수 있습니다. AWS-published 패키지에는 이 In-place update 옵션이 지원되지 않습니다. Uninstall and reinstall기본값입니다.

형식: 열거형

유효한 값: Uninstall and reinstall | In-place update

필수 항목 여부: 아니요

additionalArguments

스크립트 설치, 제거 또는 업데이트에 제공되는 추가 파라미터의 JSON 문자열입니다. 각 파라미터에는 SSM_가 접두사로 붙어야 합니다. 규칙 {{ssm:parameter-name}}을 사용하여 추가 인수에서 Parameter Store 파라미터를 참조할 수 있습니다. 설치, 제거 또는 업데이트 스크립트에서 추가 파라미터를 사용하려면 운영 체제에 적합한 구문을 사용하여 파라미터를 환경 변수로 참조해야 합니다. 예를 들어 PowerShell, 에서는 SSM_arg 인수를 로 $Env:SSM_arg 참조합니다. 정의하는 인수 수에는 제한이 없지만 추가 인수 입력에는 4,096자 제한이 있습니다. 이 제한에는 정의한 모든 키와 값이 포함됩니다.

다음과 같이 입력합니다. StringMap

필수 항목 여부: 아니요

version

설치 또는 제거할 패키지의 특정 버전입니다. 설치하는 경우 기본적으로 시스템이 최근에 게시된 버전을 설치합니다. 제거하는 경우 기본적으로 시스템이 현재 설치된 버전을 제거합니다. 설치된 버전이 발견되지 않으면 최근에 게시된 버전이 다운로드되고 제거 작업이 실행됩니다.

타입: 문자열

필수 항목 여부: 아니요

aws:domainJoin

도메인에 EC2 인스턴스를 조인합니다. 이 플러그인은 Linux 및 Windows Server 운영 체제에서 실행됩니다. 이 플러그인은 Linux 인스턴스의 호스트 이름을 EC2AMAZ-XXXXXXX 형식으로 변경합니다. EC2 인스턴스 조인에 대한 자세한 내용은 AWS Directory Service 관리 가이드의 관리형 AWS Microsoft AD 디렉터리에 EC2 인스턴스 조인을 참조하십시오.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:domainJoin parameters: directoryId: description: "(Required) The ID of the directory." type: String directoryName: description: "(Required) The name of the domain." type: String directoryOU: description: "(Optional) The organizational unit to assign the computer object to." type: String dnsIpAddresses: description: "(Required) The IP addresses of the DNS servers for your directory." type: StringList mainSteps: - action: aws:domainJoin name: domainJoin inputs: directoryId: "{{ directoryId }}" directoryName: "{{ directoryName }}" directoryOU: "{{ directoryOU }}" dnsIpAddresses: "{{ dnsIpAddresses }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:domainJoin", "parameters": { "directoryId": { "description": "(Required) The ID of the directory.", "type": "String" }, "directoryName": { "description": "(Required) The name of the domain.", "type": "String" }, "directoryOU": { "description": "(Optional) The organizational unit to assign the computer object to.", "type": "String" }, "dnsIpAddresses": { "description": "(Required) The IP addresses of the DNS servers for your directory.", "type": "StringList" }, }, "mainSteps": [ { "action": "aws:domainJoin", "name": "domainJoin", "inputs": { "directoryId": "{{ directoryId }}", "directoryName": "{{ directoryName }}", "directoryOU":"{{ directoryOU }}", "dnsIpAddresses":"{{ dnsIpAddresses }}" } } ] }

스키마 1.2

YAML
--- runtimeConfig: aws:domainJoin: properties: directoryId: "{{ directoryId }}" directoryName: "{{ directoryName }}" directoryOU: "{{ directoryOU }}" dnsIpAddresses: "{{ dnsIpAddresses }}"
JSON
{ "runtimeConfig":{ "aws:domainJoin":{ "properties":{ "directoryId":"{{ directoryId }}", "directoryName":"{{ directoryName }}", "directoryOU":"{{ directoryOU }}", "dnsIpAddresses":"{{ dnsIpAddresses }}" } } } }

속성

directoryId

디렉터리의 ID입니다.

타입: 문자열

필수 항목 여부: 예

예: "directoryId": "d-1234567890"

directoryName

도메인 이름.

타입: 문자열

필수 항목 여부: 예

예: "directoryName": "example.com"

directoryOU

조직 단위(OU)입니다.

타입: 문자열

필수 항목 여부: 아니요

예: "directoryOU": "OU=test,DC=example,DC=com"

dnsIpAddresses

DNS 서버의 IP 주소입니다.

유형: StringList

필수 항목 여부: 예

예: "dnsIpAddresses“: [" 198.51.100.1", "198.51.100.2"]

예시는 AWS Directory Service 관리 안내서AWS Managed Microsoft AD에 Amazon EC2 인스턴스 조인을 참조하세요.

aws:downloadContent

(스키마 버전 2.0 이상) 원격 위치에서 SSM 문서 및 스크립트를 다운로드합니다. GitHub Enterprise리포지토리는 지원되지 않습니다. 이 플러그인은 Linux 및 Windows Server 운영 체제에서 지원됩니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:downloadContent parameters: sourceType: description: "(Required) The download source." type: String sourceInfo: description: "(Required) The information required to retrieve the content from the required source." type: StringMap mainSteps: - action: aws:downloadContent name: downloadContent inputs: sourceType: "{{ sourceType }}" sourceInfo: "{{ sourceInfo }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:downloadContent", "parameters": { "sourceType": { "description": "(Required) The download source.", "type": "String" }, "sourceInfo": { "description": "(Required) The information required to retrieve the content from the required source.", "type": "StringMap" } }, "mainSteps": [ { "action": "aws:downloadContent", "name": "downloadContent", "inputs": { "sourceType":"{{ sourceType }}", "sourceInfo":"{{ sourceInfo }}" } } ] }

입력

sourceType

다운로드 소스입니다. Systems Manager는 스크립트 및 SSM 문서 다운로드를 위해 GitHub, Git, HTTP, S3SSMDocument 소스 유형을 지원합니다.

타입: 문자열

필수 항목 여부: 예

sourceInfo

필요한 원본에서 콘텐츠를 검색하는 데 필요한 정보입니다.

유형: StringMap

필수 항목 여부: 예

sourceType GitHub,에 대해 다음을 지정합니다.

  • owner: 리포지토리 소유자입니다.

  • repository: 리포지토리의 이름입니다.

  • path: 다운로드할 파일 또는 디렉터리에 대한 경로입니다.

  • getOptions: 마스터가 아닌 분기 또는 리포지토리의 특정 커밋에서 내용을 검색하는 추가 옵션입니다. 마스터 분기에서 최신 커밋을 사용하는 경우 getOptions를 생략할 수 있습니다. 리포지토리가 2020년 10월 1일 이후에 생성된 경우 기본 분기의 이름은 master 대신 main이 될 수 있습니다. 이 경우 getOptions 파라미터에 대한 값을 지정해야 합니다.

    이 파라미터는 다음 형식을 사용합니다.

    • branch:refs/heads/branch_name

      기본값은 master입니다.

      기본이 아닌 브랜치를 지정하려면 다음 형식을 사용합니다.

      branch:refs/heads/branch_name

    • commitID:commitID

      기본값은 head입니다.

      최신 버전이 아닌 커밋에서 SSM 문서의 버전을 사용하려면 전체 커밋 ID를 지정합니다. 예:

      "getOptions": "commitID:bbc1ddb94...b76d3bEXAMPLE",
  • TokenInfo: 액세스 토큰 정보를 다음 형식으로 저장하는 GitHub Systems Manager 매개변수 ( SecureString매개변수) 입니다. {{ssm-secure:secure-string-token-name}}

    참고

    tokenInfo 필드는 매개변수를 지원하는 유일한 SSM 문서 플러그인 필드입니다. SecureString SecureString 다른 필드나 다른 SSM 문서 플러그인에서는 매개변수가 지원되지 않습니다.

{ "owner":"TestUser", "repository":"GitHubTest", "path":"scripts/python/test-script", "getOptions":"branch:master", "tokenInfo":"{{ssm-secure:secure-string-token}}" }

sourceType Git에 대해 다음을 지정해야 합니다.

  • 리포지토리

    다운로드할 파일 또는 디렉터리의 Git 리포지토리 URL입니다.

    타입: 문자열

또한 다음과 같은 파라미터(옵션)를 지정할 수 있습니다.

  • getOptions

    마스터가 아닌 분기 또는 리포지토리의 특정 커밋에서 내용을 검색하는 추가 옵션입니다. 마스터 분기에서 최신 커밋을 사용하는 경우 getOptions를 생략할 수 있습니다.

    타입: 문자열

    이 파라미터는 다음 형식을 사용합니다.

    • branch:refs/heads/branch_name

      기본값은 master입니다.

      "branch"는 SSM 문서가 master가 아닌 분기에 저장된 경우에만 필요합니다. 예:

      "getOptions": "branch:refs/head/main"
    • commitID:commitID

      기본값은 head입니다.

      최신 버전이 아닌 커밋에서 SSM 문서의 버전을 사용하려면 전체 커밋 ID를 지정합니다. 예:

      "getOptions": "commitID:bbc1ddb94...b76d3bEXAMPLE",
  • privateSSHKey

    지정하는 repository에 연결할 때 사용할 SSH 키입니다. {{ssm-secure:your-secure-string-parameter}} 형식을 사용하여 SSH 키 값에 대한 SecureString 파라미터를 참조할 수 있습니다.

    타입: 문자열

  • skipHostKey확인

    repository지정한 항목에 연결할 때 StrictHostKeyChecking 옵션의 값을 결정합니다. 기본 값은 false입니다.

    타입: 부울

  • 사용자 이름

    HTTP를 사용하여 지정한 repository에 연결할 때 사용할 사용자 이름입니다. {{ssm-secure:your-secure-string-parameter}} 형식을 사용하여 사용자 이름 값에 대한 SecureString 파라미터를 참조할 수 있습니다.

    타입: 문자열

  • 비밀번호

    HTTP를 사용하여 지정한 repository에 연결할 때 사용할 암호입니다. {{ssm-secure:your-secure-string-parameter}} 형식을 사용하여 암호 값에 대한 SecureString 파라미터를 참조할 수 있습니다.

    타입: 문자열

sourceType HTTP에 대해 다음을 지정해야 합니다.

  • url

    다운로드할 파일 또는 디렉터리의 URL입니다.

    타입: 문자열

또한 다음과 같은 파라미터(옵션)를 지정할 수 있습니다.

  • allowInsecureDownload

    보안 소켓 계층(SSL) 또는 전송 계층 보안(TLS)으로 암호화되지 않은 연결을 통해 다운로드를 수행할 수 있는지 여부를 결정합니다. 기본 값은 false입니다. 암호화 없이 다운로드를 수행하지 않는 것이 좋습니다. 그렇게 하기로 선택하는 경우 모든 관련 위험을 감수해야 합니다. 보안은 사용자와 사용자 AWS 간의 공동 책임입니다. 이것을 공동 책임 모델이라고 합니다. 자세한 내용은 공동 책임 모델을 참조하세요.

    타입: 부울

  • authMethod

    지정한 url에 연결할 때 사용자 이름과 암호를 인증에 사용할지 여부를 결정합니다. Basic 또는 Digest를 지정하는 경우 usernamepassword 파라미터에 대한 값을 제공해야 합니다. Digest 메서드를 사용하려면 인스턴스에 SSM Agent 버전 3.0.1181.0 이상이 설치되어 있어야 합니다. Digest 메서드는 MD5 및 SHA256 암호화를 지원합니다.

    타입: 문자열

    유효한 값: None | Basic | Digest

  • 사용자 이름

    Basic 인증을 사용하여 지정한 url에 연결할 때 사용할 사용자 이름입니다. {{ssm-secure:your-secure-string-parameter}} 형식을 사용하여 사용자 이름 값에 대한 SecureString 파라미터를 참조할 수 있습니다.

    타입: 문자열

  • 비밀번호

    Basic 인증을 사용하여 지정한 url에 연결할 때 사용할 암호입니다. {{ssm-secure:your-secure-string-parameter}} 형식을 사용하여 암호 값에 대한 SecureString 파라미터를 참조할 수 있습니다.

    타입: 문자열

sourceType S3에 대해 다음을 지정합니다.

  • path: Amazon S3에서 다운로드할 파일 또는 디렉터리의 URL입니다.

{ "path": "https://s3.amazonaws.com/doc-example-bucket/powershell/helloPowershell.ps1" }

sourceType SSMDocument에 대해 다음 중 하나를 지정합니다.

  • name: 문서의 이름 및 버전입니다. 형식: name:version. 버전은 선택 항목입니다.

    { "name": "Example-RunPowerShellScript:3" }
  • name: 문서에 대한 ARN입니다(arn:aws:ssm:region:account_id:document/document_name 형식).

    { "name":"arn:aws:ssm:us-east-2:3344556677:document/MySharedDoc" }
destinationPath

파일을 다운로드하고자 할 때 선택할 수 있는 인스턴스의 로컬 경로 옵션입니다. 경로를 지정하지 않은 경우에는 명령 ID와 관련된 경로에 콘텐츠가 다운로드됩니다.

타입: 문자열

필수 항목 여부: 아니요

aws:psModule

Amazon EC2 인스턴스에 PowerShell 모듈을 설치합니다. 이 플러그인은 Windows Server 운영 체제에서만 실행됩니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:psModule parameters: source: description: "(Required) The URL or local path on the instance to the application .zip file." type: String mainSteps: - action: aws:psModule name: psModule inputs: source: "{{ source }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:psModule", "parameters": { "source": { "description": "(Required) The URL or local path on the instance to the application .zip file.", "type": "String" } }, "mainSteps": [ { "action": "aws:psModule", "name": "psModule", "inputs": { "source": "{{ source }}" } } ] }

스키마 1.2

YAML
--- runtimeConfig: aws:psModule: properties: - runCommand: "{{ commands }}" source: "{{ source }}" sourceHash: "{{ sourceHash }}" workingDirectory: "{{ workingDirectory }}" timeoutSeconds: "{{ executionTimeout }}"
JSON
{ "runtimeConfig":{ "aws:psModule":{ "properties":[ { "runCommand":"{{ commands }}", "source":"{{ source }}", "sourceHash":"{{ sourceHash }}", "workingDirectory":"{{ workingDirectory }}", "timeoutSeconds":"{{ executionTimeout }}" } ] } } }

속성

runCommand

모듈이 설치된 후 실행할 PowerShell 명령입니다.

입력: StringList

필수 항목 여부: 아니요

source

애플리케이션 .zip 파일에 대한 URL 또는 인스턴스 상 로컬 경로입니다.

타입: 문자열

필수 항목 여부: 예

sourceHash

.zip 파일의 SHA256 해시입니다.

타입: 문자열

필수 항목 여부: 아니요

timeoutSeconds

명령이 실패로 간주되기 전에 완료되어야 할 시간(초)입니다.

타입: 문자열

필수 항목 여부: 아니요

workingDirectory

인스턴스 상의 작업 디렉터리에 대한 경로.

타입: 문자열

필수 항목 여부: 아니요

aws:refreshAssociation

(스키마 버전 2.0 이상) 온디맨드로 연결을 새로 고칩니다(강제 적용). 이 작업은 대상에 바운딩된 선택된 연결 또는 모든 연결에서 정의된 대로 시스템 상태를 변경합니다. 이 플러그인은 Linux 및 Microsoft Windows Server 운영 체제에서 실행됩니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:refreshAssociation parameters: associationIds: description: "(Optional) List of association IDs. If empty, all associations bound to the specified target are applied." type: StringList mainSteps: - action: aws:refreshAssociation name: refreshAssociation inputs: associationIds: - "{{ associationIds }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:refreshAssociation", "parameters": { "associationIds": { "description": "(Optional) List of association IDs. If empty, all associations bound to the specified target are applied.", "type": "StringList" } }, "mainSteps": [ { "action": "aws:refreshAssociation", "name": "refreshAssociation", "inputs": { "associationIds": [ "{{ associationIds }}" ] } } ] }

입력

associationIds

연결 ID의 목록입니다. 비어 있을 경우, 지정된 대상에 바인딩된 모든 연결이 적용됩니다.

유형: StringList

필수 항목 여부: 아니요

aws:runDockerAction

(스키마 버전 2.0 이상) 컨테이너에서 도커 작업을 실행합니다. 이 플러그인은 Linux 및 Microsoft Windows Server 운영 체제에서 실행됩니다.

구문

스키마 2.2

YAML
--- mainSteps: - action: aws:runDockerAction name: RunDockerAction inputs: action: "{{ action }}" container: "{{ container }}" image: "{{ image }}" memory: "{{ memory }}" cpuShares: "{{ cpuShares }}" volume: "{{ volume }}" cmd: "{{ cmd }}" env: "{{ env }}" user: "{{ user }}" publish: "{{ publish }}"
JSON
{ "mainSteps":[ { "action":"aws:runDockerAction", "name":"RunDockerAction", "inputs":{ "action":"{{ action }}", "container":"{{ container }}", "image":"{{ image }}", "memory":"{{ memory }}", "cpuShares":"{{ cpuShares }}", "volume":"{{ volume }}", "cmd":"{{ cmd }}", "env":"{{ env }}", "user":"{{ user }}", "publish":"{{ publish }}" } } ] }

입력

작업

수행할 작업의 유형입니다.

타입: 문자열

필수 항목 여부: 예

컨테이너

도커 컨테이너 ID입니다.

타입: 문자열

필수 항목 여부: 아니요

image

도커 이미지 이름입니다.

타입: 문자열

필수 항목 여부: 아니요

cmd

컨테이너 명령입니다.

타입: 문자열

필수 항목 여부: 아니요

메모리

컨테이너 메모리 제한입니다.

타입: 문자열

필수 항목 여부: 아니요

cpuShares

컨테이너 CPU 공유입니다(상대 가중치).

타입: 문자열

필수 항목 여부: 아니요

볼륨

컨테이너 볼륨 마운트입니다.

유형: StringList

필수 항목 여부: 아니요

env

컨테이너 환경 변수입니다.

타입: 문자열

필수 항목 여부: 아니요

사용자

컨테이너 사용자 이름입니다.

타입: 문자열

Required: No

publish

컨테이너 게시 포트입니다.

타입: 문자열

필수 항목 여부: 아니요

aws:runDocument

(스키마 버전 2.0 이상) Systems Manager 또는 로컬 공유에 저장된 SSM 문서를 실행합니다. 이 플러그인을 aws:downloadContent 플러그인과 함께 사용하면 원격 위치에서 로컬 공유로 SSM 문서를 다운로드하여 실행할 수 있습니다. 이 플러그인은 Linux 및 Windows Server 운영 체제에서 지원됩니다. 이 플러그인은 aws:updateSsmAgent 플러그 인을 사용하는 AWS-UpdateSSMAgent 문서 또는 다른 문서 실행을 지원하지 않습니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:runDocument parameters: documentType: description: "(Required) The document type to run." type: String allowedValues: - LocalPath - SSMDocument mainSteps: - action: aws:runDocument name: runDocument inputs: documentType: "{{ documentType }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:runDocument", "parameters": { "documentType": { "description": "(Required) The document type to run.", "type": "String", "allowedValues": [ "LocalPath", "SSMDocument" ] } }, "mainSteps": [ { "action": "aws:runDocument", "name": "runDocument", "inputs": { "documentType": "{{ documentType }}" } } ] }

입력

documentType

실행할 문서 유형입니다. 로컬 문서(LocalPath) 또는 Systems Manager에 저장된 문서(SSMDocument)를 실행할 수 있습니다.

타입: 문자열

필수 항목 여부: 예

documentPath

문서에 대한 경로입니다. documentTypeLocalPath일 경우, 로컬 공유에 저장된 문서에 대한 경로를 지정합니다. documentTypeSSMDocument일 경우, 문서의 이름을 지정합니다.

타입: 문자열

필수 항목 여부: 아니요

documentParameters

문서에 대한 파라미터입니다.

유형: StringMap

필수 항목 여부: 아니요

aws:runPowerShellScript

PowerShell 스크립트를 실행하거나 실행할 스크립트의 경로를 지정합니다. 이 플러그인은 Microsoft Windows Server 및 Linux 운영 체제에서 실행됩니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:runPowerShellScript parameters: commands: type: String description: "(Required) The commands to run or the path to an existing script on the instance." default: Write-Host "Hello World" mainSteps: - action: aws:runPowerShellScript name: runPowerShellScript inputs: timeoutSeconds: '60' runCommand: - "{{ commands }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:runPowerShellScript", "parameters": { "commands": { "type": "String", "description": "(Required) The commands to run or the path to an existing script on the instance.", "default": "Write-Host \"Hello World\"" } }, "mainSteps": [ { "action": "aws:runPowerShellScript", "name": "runPowerShellScript", "inputs": { "timeoutSeconds": "60", "runCommand": [ "{{ commands }}" ] } } ] }

스키마 1.2

YAML
--- runtimeConfig: aws:runPowerShellScript: properties: - id: 0.aws:runPowerShellScript runCommand: "{{ commands }}" workingDirectory: "{{ workingDirectory }}" timeoutSeconds: "{{ executionTimeout }}"
JSON
{ "runtimeConfig":{ "aws:runPowerShellScript":{ "properties":[ { "id":"0.aws:runPowerShellScript", "runCommand":"{{ commands }}", "workingDirectory":"{{ workingDirectory }}", "timeoutSeconds":"{{ executionTimeout }}" } ] } } }

속성

runCommand

실행할 명령 또는 인스턴스의 기존 스크립트에 대한 경로를 지정합니다.

다음을 입력합니다. StringList

필수 항목 여부: 예

timeoutSeconds

명령이 실패로 간주되기 전에 완료되어야 할 시간(초)입니다. 시간 제한에 도달하면 Systems Manager가 명령 실행을 멈춥니다.

타입: 문자열

필수 항목 여부: 아니요

workingDirectory

인스턴스 상의 작업 디렉터리에 대한 경로.

타입: 문자열

필수 항목 여부: 아니요

aws:runShellScript

Linux 셸 스크립트를 실행하거나 실행할 스크립트에 대한 경로를 지정합니다. 이 플러그인은 Linux 운영 체제에서만 실행됩니다.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:runShellScript parameters: commands: type: String description: "(Required) The commands to run or the path to an existing script on the instance." default: echo Hello World mainSteps: - action: aws:runShellScript name: runShellScript inputs: timeoutSeconds: '60' runCommand: - "{{ commands }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:runShellScript", "parameters": { "commands": { "type": "String", "description": "(Required) The commands to run or the path to an existing script on the instance.", "default": "echo Hello World" } }, "mainSteps": [ { "action": "aws:runShellScript", "name": "runShellScript", "inputs": { "timeoutSeconds": "60", "runCommand": [ "{{ commands }}" ] } } ] }

스키마 1.2

YAML
--- runtimeConfig: aws:runShellScript: properties: - runCommand: "{{ commands }}" workingDirectory: "{{ workingDirectory }}" timeoutSeconds: "{{ executionTimeout }}"
JSON
{ "runtimeConfig":{ "aws:runShellScript":{ "properties":[ { "runCommand":"{{ commands }}", "workingDirectory":"{{ workingDirectory }}", "timeoutSeconds":"{{ executionTimeout }}" } ] } } }

속성

runCommand

실행할 명령 또는 인스턴스의 기존 스크립트에 대한 경로를 지정합니다.

유형: StringList

필수 항목 여부: 예

timeoutSeconds

명령이 실패로 간주되기 전에 완료되어야 할 시간(초)입니다. 시간 제한에 도달하면 Systems Manager가 명령 실행을 멈춥니다.

타입: 문자열

필수 항목 여부: 아니요

workingDirectory

인스턴스 상의 작업 디렉터리에 대한 경로.

타입: 문자열

필수 항목 여부: 아니요

aws:softwareInventory

(스키마 버전 2.0 이상) 관리형 인스턴스의 애플리케이션, 파일 및 구성에 대한 메타데이터를 수집합니다. 이 플러그인은 Linux 및 Microsoft Windows Server 운영 체제에서 실행됩니다. 인벤토리 수집을 구성할 때는 먼저 AWS Systems Manager State Manager 연결을 생성합니다. Systems Manager는 연결이 실행될 때 인벤토리 데이터를 수집합니다. 연결을 먼저 생성하지 않고 aws:softwareInventory 플러그인을 호출하려고 하면 시스템이 다음 오류를 반환합니다.

The aws:softwareInventory plugin can only be invoked via ssm-associate.

인스턴스에는 한 번에 하나의 인벤토리 연결만 구성할 수 있습니다. 둘 이상의 연결로 인스턴스를 구성할 경우 인벤토리 연결이 실행되지 않으며 인벤토리 데이터가 수집되지 않습니다. 인벤토리 수집에 대한 자세한 내용은 AWS Systems Manager Inventory 섹션을 참조하세요.

구문

스키마 2.2

YAML
--- mainSteps: - action: aws:softwareInventory name: collectSoftwareInventoryItems inputs: applications: "{{ applications }}" awsComponents: "{{ awsComponents }}" networkConfig: "{{ networkConfig }}" files: "{{ files }}" services: "{{ services }}" windowsRoles: "{{ windowsRoles }}" windowsRegistry: "{{ windowsRegistry}}" windowsUpdates: "{{ windowsUpdates }}" instanceDetailedInformation: "{{ instanceDetailedInformation }}" customInventory: "{{ customInventory }}"
JSON
{ "mainSteps":[ { "action":"aws:softwareInventory", "name":"collectSoftwareInventoryItems", "inputs":{ "applications":"{{ applications }}", "awsComponents":"{{ awsComponents }}", "networkConfig":"{{ networkConfig }}", "files":"{{ files }}", "services":"{{ services }}", "windowsRoles":"{{ windowsRoles }}", "windowsRegistry":"{{ windowsRegistry}}", "windowsUpdates":"{{ windowsUpdates }}", "instanceDetailedInformation":"{{ instanceDetailedInformation }}", "customInventory":"{{ customInventory }}" } } ] }

입력

애플리케이션

(선택 사항) 설치한 애플리케이션에 대한 메타데이터를 수집합니다.

타입: 문자열

필수 항목 여부: 아니요

awsComponents

(선택 사항) 와 같은 AWS 구성 요소의 메타데이터를 수집합니다 amazon-ssm-agent.

타입: 문자열

필수 항목 여부: 아니요

files

(옵션, SSM Agent 버전 2.2.64.0 이상 필요) 몇 가지 예를 들자면 파일 이름, 파일 생성 시각, 파일을 마지막으로 수정하고 액세스한 시간, 파일 크기 등 파일에 관한 메타데이터 정보를 수집합니다. 파일 인벤토리 수집에 대한 자세한 내용은 파일 및 Windows 레지스트리 인벤토리 관련 작업 섹션을 참조하세요.

타입: 문자열

필수 항목 여부: 아니요

networkConfig

(선택 사항) 네트워크 구성에 대한 메타데이터를 수집합니다.

타입: 문자열

필수 항목 여부: 아니요

windowsUpdates

(선택 사항) 모든 Windows 업데이트에 대한 메타데이터를 수집합니다.

타입: 문자열

필수 항목 여부: 아니요

instanceDetailedInformation

(옵션) CPU 모델, 속도, 코어 수를 포함하여 기본 인벤토리 플러그인(aws:instanceInformation)에서 제공하는 것 이외의 인스턴스 정보를 수집합니다.

타입: 문자열

필수 항목 여부: 아니요

서비스

(옵션, Windows OS에만 해당, SSM Agent 버전 2.2.64.0 이상 필요) 서비스 구성에 대한 메타데이터를 수집합니다.

타입: 문자열

필수 항목 여부: 아니요

windowsRegistry

(옵션, Windows OS에만 해당, SSM Agent 버전 2.2.64.0 이상 필요) Windows 레지스트리 키 및 값을 수집합니다. 키 경로를 선택하고 모든 키와 값을 반복적으로 수집할 수 있습니다. 특정 경로에 대해 특정 레지스트리 키와 그 값을 수집할 수도 있습니다. 인벤토리는 키 경로, 이름 및 값을 수집합니다. Windows 레지스트리 인벤토리를 수집하는 방법에 대한 자세한 내용은 파일 및 Windows 레지스트리 인벤토리 관련 작업 섹션을 참조하세요.

타입: 문자열

필수 항목 여부: 아니요

windowsRoles

(옵션, Windows OS에만 해당, SSM Agent 버전 2.2.64.0 이상 필요) Microsoft Windows 역할 구성에 대한 메타데이터를 수집합니다.

타입: 문자열

필수 항목 여부: 아니요

customInventory

(선택 사항) 사용자 지정 인벤토리 데이터를 수집합니다. 사용자 정의 인벤토리에 대한 자세한 내용은 사용자 정의 인벤토리 작업 섹션을 참조하세요.

타입: 문자열

필수 항목 여부: 아니요

aws:updateAgent

EC2Config 서비스를 최신 버전으로 업데이트하거나 이전 버전을 지정합니다. 이 플러그인은 Microsoft Windows Server 운영 체제에서만 실행됩니다. EC2Config 서비스에 대한 자세한 내용은 EC2Config 서비스를 사용한 Windows 인스턴스 구성을 참조하세요.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:updateAgent mainSteps: - action: aws:updateAgent name: updateAgent inputs: agentName: Ec2Config source: https://s3.{Region}.amazonaws.com/aws-ssm-{Region}/manifest.json
JSON
{ "schemaVersion": "2.2", "description": "aws:updateAgent", "mainSteps": [ { "action": "aws:updateAgent", "name": "updateAgent", "inputs": { "agentName": "Ec2Config", "source": "https://s3.{Region}.amazonaws.com/aws-ssm-{Region}/manifest.json" } } ] }

스키마 1.2

YAML
--- runtimeConfig: aws:updateAgent: properties: agentName: Ec2Config source: https://s3.{Region}.amazonaws.com/aws-ssm-{Region}/manifest.json allowDowngrade: "{{ allowDowngrade }}" targetVersion: "{{ version }}"
JSON
{ "runtimeConfig":{ "aws:updateAgent":{ "properties":{ "agentName":"Ec2Config", "source":"https://s3.{Region}.amazonaws.com/aws-ssm-{Region}/manifest.json", "allowDowngrade":"{{ allowDowngrade }}", "targetVersion":"{{ version }}" } } } }

속성

agentName

EC2Config. 이것은 EC2Config 서비스를 실행하는 에이전트의 이름입니다.

타입: 문자열

필수 항목 여부: 예

allowDowngrade

EC2Config 서비스를 이전 버전으로 다운그레이드할 수 있게 허용합니다. false로 설정할 경우, 서비스가 새 버전으로 업그레이드만 될 수 있습니다(기본값). true로 설정하는 경우, 이전 버전을 지정합니다.

타입: 부울

필수 항목 여부: 아니요

source

Systems Manager가 설치할 EC2Config의 버전을 복사하는 위치입니다. 이 위치는 변경할 수 없습니다.

타입: 문자열

필수 항목 여부: 예

targetVersion

설치할 EC2Config 서비스의 특정 버전입니다. 버전을 지정하지 않으면 서비스는 최신 버전으로 업데이트됩니다.

타입: 문자열

필수 항목 여부: 아니요

aws:updateSsmAgent

SSM Agent를 최신 버전으로 업데이트하거나 이전 버전을 지정합니다. 이 플러그인은 Linux 및 Windows Server 운영 체제에서 실행됩니다. 자세한 설명은 SSM Agent 작업 섹션을 참조하세요.

구문

스키마 2.2

YAML
--- schemaVersion: '2.2' description: aws:updateSsmAgent parameters: allowDowngrade: default: 'false' description: "(Optional) Allow the Amazon SSM Agent service to be downgraded to an earlier version. If set to false, the service can be upgraded to newer versions only (default). If set to true, specify the earlier version." type: String allowedValues: - 'true' - 'false' mainSteps: - action: aws:updateSsmAgent name: updateSSMAgent inputs: agentName: amazon-ssm-agent source: https://s3.{Region}.amazonaws.com/amazon-ssm-{Region}/ssm-agent-manifest.json allowDowngrade: "{{ allowDowngrade }}"
JSON
{ "schemaVersion": "2.2", "description": "aws:updateSsmAgent", "parameters": { "allowDowngrade": { "default": "false", "description": "(Required) Allow the Amazon SSM Agent service to be downgraded to an earlier version. If set to false, the service can be upgraded to newer versions only (default). If set to true, specify the earlier version.", "type": "String", "allowedValues": [ "true", "false" ] } }, "mainSteps": [ { "action": "aws:updateSsmAgent", "name": "awsupdateSsmAgent", "inputs": { "agentName": "amazon-ssm-agent", "source": "https://s3.{Region}.amazonaws.com/amazon-ssm-{Region}/ssm-agent-manifest.json", "allowDowngrade": "{{ allowDowngrade }}" } } ] }

스키마 1.2

YAML
--- runtimeConfig: aws:updateSsmAgent: properties: - agentName: amazon-ssm-agent source: https://s3.{Region}.amazonaws.com/aws-ssm-{Region}/manifest.json allowDowngrade: "{{ allowDowngrade }}"
JSON
{ "runtimeConfig":{ "aws:updateSsmAgent":{ "properties":[ { "agentName":"amazon-ssm-agent", "source":"https://s3.{Region}.amazonaws.com/aws-ssm-{Region}/manifest.json", "allowDowngrade":"{{ allowDowngrade }}" } ] } } }

속성

agentName

amazon-ssm-agent. 요청을 처리하고 인스턴스에서 명령을 실행하는 Systems Manager Agent의 이름입니다.

타입: 문자열

필수 항목 여부: 예

allowDowngrade

SSM Agent를 이전 버전으로 다운그레이드할 수 있게 허용합니다. false로 설정할 경우, 에이전트가 새 버전으로 업그레이드만 될 수 있습니다(기본값). true로 설정하는 경우, 이전 버전을 지정합니다.

타입: 부울

필수 항목 여부: 예

source

Systems Manager가 설치할 SSM Agent 버전을 복사하는 위치입니다. 이 위치는 변경할 수 없습니다.

타입: 문자열

필수 항목 여부: 예

targetVersion

설치할 SSM Agent의 특정 버전입니다. 버전을 지정하지 않으면 에이전트는 최신 버전으로 업데이트됩니다.

타입: 문자열

필수 항목 여부: 아니요