-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathintro-experiment-cfn-template.json
60 lines (60 loc) · 2.25 KB
/
intro-experiment-cfn-template.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"Resources": {
"FisWorkshopTemplate": {
"Type": "AWS::FIS::ExperimentTemplate",
"Properties": {
"Description": "Terminate half of the instances in the auto scaling group",
"Tags": {
"Name": "FisWorkshop-Exp1-CloudFormation"
},
"Actions": {
"FisWorkshopAsg-TerminateInstances": {
"ActionId": "aws:ec2:terminate-instances",
"Description": "Terminate instances",
"Parameters": {},
"Targets": {
"Instances": "FisWorkshopAsg-50Percent"
}
},
"Wait": {
"ActionId": "aws:fis:wait",
"Parameters": {
"duration": "PT3M"
}
}
},
"Targets": {
"FisWorkshopAsg-50Percent": {
"ResourceType": "aws:ec2:instance",
"ResourceTags": {
"experiment": "ready"
},
"Filters": [
{
"Path": "State.Name",
"Values": ["running"]
}
],
"SelectionMode": "PERCENT(50)"
}
},
"StopConditions": [
{
"Source": "none"
}
],
"RoleArn": {
"Fn::Sub": "arn:aws:iam::${AWS::AccountId}:role/KKFisWorkshopEC2ServiceRole"
},
"LogConfiguration": {
"CloudWatchLogsConfiguration": {
"LogGroupArn": {
"Fn::Sub": "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:FISExperiment:*"
}
},
"LogSchemaVersion": 2
}
}
}
}
}