templates/mf-es-template.yaml [567:744]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        000-NoOperation:
          commands:
            a-no-operation:
              command: echo "No-Operation" > nul
              waitAfterCompletion: '0'
        010-InstallTools:
          files:
            'c:\cfn\assets\AWSCLI64PY3.msi':
              source: 'https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi'
            'c:\cfn\assets\GoogleChromeStandaloneEnterprise64.msi':
              source: >-
                https://dl.google.com/edgedl/chrome/install/GoogleChromeStandaloneEnterprise64.msi
          commands:
            a-install-aws-cli:
              command: 'start /wait c:\cfn\assets\AWSCLI64PY3.msi /quiet /passive /qn'
              waitAfterCompletion: '0'
            b-install-chrome:
              command: >-
                start /wait c:\cfn\assets\GoogleChromeStandaloneEnterprise64.msi
                /quiet /passive
              waitAfterCompletion: '0'
        020-ConfigureCWLogs:
          files:
            'C:\Program Files\Amazon\SSM\Plugins\awsCloudWatch\AWS.EC2.Windows.CloudWatch.json':
              content: !Sub |
                {
                  "IsEnabled": true,
                  "EngineConfiguration": {
                    "PollInterval": "00:00:05",
                    "Components": [
                      {
                        "Id": "ApplicationEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogName": "Application",
                          "Levels": "7"
                        }
                      },
                      {
                        "Id": "SystemEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogName": "System",
                          "Levels": "7"
                        }
                      },
                      {
                        "Id": "SecurityEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogName": "Security",
                          "Levels": "7"
                        }
                      },
                      {
                        "Id": "EC2ConfigLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CustomLog.CustomLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogDirectoryPath": "C:\\Program Files\\Amazon\\Ec2ConfigService\\Logs",
                          "TimestampFormat": "yyyy-MM-ddTHH:mm:ss.fffZ:",
                          "Encoding": "ASCII",
                          "Filter": "EC2ConfigLog.txt",
                          "CultureName": "en-US",
                          "TimeZoneKind": "UTC"
                        }
                      },
                      {
                        "Id": "CfnInitLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CustomLog.CustomLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogDirectoryPath": "C:\\cfn\\log",
                          "TimestampFormat": "yyyy-MM-dd HH:mm:ss,fff",
                          "Encoding": "ASCII",
                          "Filter": "cfn-init.log",
                          "CultureName": "en-US",
                          "TimeZoneKind": "Local"
                        }
                      },
                      {
                        "Id": "MemoryPerformanceCounter",
                        "FullName": "AWS.EC2.Windows.CloudWatch.PerformanceCounterComponent.PerformanceCounterInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "CategoryName": "Memory",
                          "CounterName": "Available MBytes",
                          "InstanceName": "",
                          "MetricName": "Memory",
                          "Unit": "Megabytes",
                          "DimensionName": "",
                          "DimensionValue": ""
                        }
                      },
                      {
                        "Id": "CloudWatchApplicationEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/ApplicationEventLog"
                        }
                      },
                      {
                        "Id": "CloudWatchSystemEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/SystemEventLog"
                        }
                      },
                      {
                        "Id": "CloudWatchSecurityEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/SecurityEventLog"
                        }
                      },
                      {
                        "Id": "CloudWatchEC2ConfigLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/EC2ConfigLog"
                        }
                      },
                      {
                        "Id": "CloudWatchCfnInitLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/CfnInitLog"
                        }
                      },
                      {
                        "Id": "CloudWatch",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatch.CloudWatchOutputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "NameSpace": "Windows/Default"
                        }
                      }
                    ],
                    "Flows": {
                      "Flows": [
                        "ApplicationEventLog,CloudWatchApplicationEventLog",
                        "SystemEventLog,CloudWatchSystemEventLog",
                        "SecurityEventLog,CloudWatchSecurityEventLog",
                        "EC2ConfigLog,CloudWatchEC2ConfigLog",
                        "CfnInitLog,CloudWatchCfnInitLog",
                        "MemoryPerformanceCounter,CloudWatch"
                      ]
                    }
                  }
                }
          commands:
            a-restartSSM:
              command: powershell.exe -Command Restart-Service AmazonSSMAgent
              ignoreErrors: true
              waitAfterCompletion: 0
        030-InitPowerShell:
          files:
            'C:\cfn\scripts\Unzip-Archive.ps1':
              source: !Sub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/mf-escwa-template.yaml [393:570]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        000-NoOperation:
          commands:
            a-no-operation:
              command: echo "No-Operation" > nul
              waitAfterCompletion: '0'
        010-InstallTools:
          files:
            'c:\cfn\assets\AWSCLI64PY3.msi':
              source: 'https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi'
            'c:\cfn\assets\GoogleChromeStandaloneEnterprise64.msi':
              source: >-
                https://dl.google.com/edgedl/chrome/install/GoogleChromeStandaloneEnterprise64.msi
          commands:
            a-install-aws-cli:
              command: 'start /wait c:\cfn\assets\AWSCLI64PY3.msi /quiet /passive /qn'
              waitAfterCompletion: '0'
            b-install-chrome:
              command: >-
                start /wait c:\cfn\assets\GoogleChromeStandaloneEnterprise64.msi
                /quiet /passive
              waitAfterCompletion: '0'
        020-ConfigureCWLogs:
          files:
            'C:\Program Files\Amazon\SSM\Plugins\awsCloudWatch\AWS.EC2.Windows.CloudWatch.json':
              content: !Sub |
                {
                  "IsEnabled": true,
                  "EngineConfiguration": {
                    "PollInterval": "00:00:05",
                    "Components": [
                      {
                        "Id": "ApplicationEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogName": "Application",
                          "Levels": "7"
                        }
                      },
                      {
                        "Id": "SystemEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogName": "System",
                          "Levels": "7"
                        }
                      },
                      {
                        "Id": "SecurityEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogName": "Security",
                          "Levels": "7"
                        }
                      },
                      {
                        "Id": "EC2ConfigLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CustomLog.CustomLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogDirectoryPath": "C:\\Program Files\\Amazon\\Ec2ConfigService\\Logs",
                          "TimestampFormat": "yyyy-MM-ddTHH:mm:ss.fffZ:",
                          "Encoding": "ASCII",
                          "Filter": "EC2ConfigLog.txt",
                          "CultureName": "en-US",
                          "TimeZoneKind": "UTC"
                        }
                      },
                      {
                        "Id": "CfnInitLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CustomLog.CustomLogInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "LogDirectoryPath": "C:\\cfn\\log",
                          "TimestampFormat": "yyyy-MM-dd HH:mm:ss,fff",
                          "Encoding": "ASCII",
                          "Filter": "cfn-init.log",
                          "CultureName": "en-US",
                          "TimeZoneKind": "Local"
                        }
                      },
                      {
                        "Id": "MemoryPerformanceCounter",
                        "FullName": "AWS.EC2.Windows.CloudWatch.PerformanceCounterComponent.PerformanceCounterInputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "CategoryName": "Memory",
                          "CounterName": "Available MBytes",
                          "InstanceName": "",
                          "MetricName": "Memory",
                          "Unit": "Megabytes",
                          "DimensionName": "",
                          "DimensionValue": ""
                        }
                      },
                      {
                        "Id": "CloudWatchApplicationEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/ApplicationEventLog"
                        }
                      },
                      {
                        "Id": "CloudWatchSystemEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/SystemEventLog"
                        }
                      },
                      {
                        "Id": "CloudWatchSecurityEventLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/SecurityEventLog"
                        }
                      },
                      {
                        "Id": "CloudWatchEC2ConfigLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/EC2ConfigLog"
                        }
                      },
                      {
                        "Id": "CloudWatchCfnInitLog",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "LogGroup": "${ESCWLogGroup}",
                          "LogStream": "ES/{instance_id}/CfnInitLog"
                        }
                      },
                      {
                        "Id": "CloudWatch",
                        "FullName": "AWS.EC2.Windows.CloudWatch.CloudWatch.CloudWatchOutputComponent,AWS.EC2.Windows.CloudWatch",
                        "Parameters": {
                          "AccessKey": "",
                          "SecretKey": "",
                          "Region": "${AWS::Region}",
                          "NameSpace": "Windows/Default"
                        }
                      }
                    ],
                    "Flows": {
                      "Flows": [
                        "ApplicationEventLog,CloudWatchApplicationEventLog",
                        "SystemEventLog,CloudWatchSystemEventLog",
                        "SecurityEventLog,CloudWatchSecurityEventLog",
                        "EC2ConfigLog,CloudWatchEC2ConfigLog",
                        "CfnInitLog,CloudWatchCfnInitLog",
                        "MemoryPerformanceCounter,CloudWatch"
                      ]
                    }
                  }
                }
          commands:
            a-restartSSM:
              command: powershell.exe -Command Restart-Service AmazonSSMAgent
              ignoreErrors: true
              waitAfterCompletion: 0
        030-InitPowerShell:
          files:
            'C:\cfn\scripts\Unzip-Archive.ps1':
              source: !Sub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



