/
CF_Target_Role.json
81 lines (81 loc) · 3.17 KB
/
CF_Target_Role.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"Parameters": {
"MasterAccountId": {
"Type": "String",
"Description": "AWS Account Id of the master account (the account from which AWS Systems Manager Automation will be initiated).",
"MaxLength": 12,
"MinLength": 12
}
},
"Resources": {
"AWSSystemsManagerAutomationExecutionRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"RoleName": "AWS-SystemsManager-AutomationExecutionRole",
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": {
"Ref": "MasterAccountId"
}
},
"Action": [
"sts:AssumeRole"
]
},
{
"Effect": "Allow",
"Principal": {
"Service": "ssm.amazonaws.com"
},
"Action": [
"sts:AssumeRole"
]
}
]
},
"Path": "/",
"Policies": [
{
"PolicyName": "ExecutionPolicy",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"iam:PassRole"
],
"Resource": {
"Fn::Sub": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/AWS-SystemsManager-AutomationExecutionRole"
}
},
{
"Effect": "Deny",
"Action": [
"iam:ChangePassword",
"iam:Create*",
"iam:Delete*",
"iam:Detach*",
"iam:Remove*",
"iam:Update*",
"iam:Upload*"
],
"Resource": "*"
}
]
}
}
]
}
}
}
}