Skip to content

Instantly share code, notes, and snippets.

@babakc
Last active August 30, 2016 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save babakc/83f27672ed5e3c3a6e6924eda5ef52bb to your computer and use it in GitHub Desktop.
Save babakc/83f27672ed5e3c3a6e6924eda5ef52bb to your computer and use it in GitHub Desktop.
"EC2" : {
"Type": "AWS::EC2::Instance",
"Metadata": {
"AWS::CloudFormation::Init": {
"configSets": {
"config": [
"monitoring",
"setup",
"rename",
"install",
"finalize"
]
},
"monitoring": {
"files": {
"C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\AWS.EC2.Windows.CloudWatch.json": {
"source": "https://s3-ap-southeast-2.amazonaws.com/bbartifacts/software/AWS.EC2.Windows.CloudWatch.json",
"Authentication": "BuildRole"
},
"c:\\cfn\\scripts\\set-cloudwatch.ps1": {
"source": "https://s3-ap-southeast-2.amazonaws.com/bbartifacts/software/set-cloudwatch.ps1",
"Authentication": "BuildRole"
}
},
"commands": {
"a-set-monitoring": {
"command": "powershell.exe -executionpolicy unrestricted -file c:\\cfn\\scripts\\set-cloudwatch.ps1",
"waitAfterCompletion": "0"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment