Skip to content

Commit 105e7b1

Browse files
author
MAMIP Bot
committed
AWSEC2SqlHaServiceRolePolicy - Policy Version v1
1 parent db13404 commit 105e7b1

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"PolicyVersion": {
3+
"CreateDate": "2025-11-13T01:34:10Z",
4+
"VersionId": "v1",
5+
"Document": {
6+
"Version": "2012-10-17",
7+
"Statement": [
8+
{
9+
"Action": "ssm:SendCommand",
10+
"Resource": [
11+
"arn:aws:ec2:*:*:instance/*"
12+
],
13+
"Effect": "Allow",
14+
"Condition": {
15+
"StringLike": {
16+
"aws:ResourceTag/SqlHaMonitored": "true"
17+
}
18+
},
19+
"Sid": "AllowSSMSendCommandToTaggedInstances"
20+
},
21+
{
22+
"Action": "ssm:SendCommand",
23+
"Resource": [
24+
"arn:aws:ssm:*:*:document/AWSEC2-DetectSqlHa*"
25+
],
26+
"Effect": "Allow",
27+
"Sid": "AllowSSMSendCommandOfOwnedDoc"
28+
},
29+
{
30+
"Action": [
31+
"ssm:DescribeInstanceInformation",
32+
"ssm:GetCommandInvocation",
33+
"ssm:ListCommands",
34+
"ssm:ListCommandInvocations"
35+
],
36+
"Resource": "*",
37+
"Effect": "Allow",
38+
"Sid": "AllowSSMNonMutating"
39+
},
40+
{
41+
"Action": [
42+
"ec2:DescribeInstances",
43+
"ec2:DescribeInstanceAttribute",
44+
"ec2:DescribeInstanceStatus",
45+
"ec2:DescribeTags"
46+
],
47+
"Resource": "*",
48+
"Effect": "Allow",
49+
"Sid": "AllowEC2NonMutating"
50+
},
51+
{
52+
"Action": [
53+
"events:PutTargets",
54+
"events:PutRule",
55+
"events:DeleteRule",
56+
"events:RemoveTargets"
57+
],
58+
"Resource": "arn:aws:events:*:*:rule/AWSEC2SqlHa*",
59+
"Effect": "Allow",
60+
"Condition": {
61+
"StringEquals": {
62+
"events:ManagedBy": "ec2sqlha.amazonaws.com",
63+
"aws:PrincipalAccount": "${aws:ResourceAccount}"
64+
}
65+
},
66+
"Sid": "AllowEventsMutateManagedRule"
67+
},
68+
{
69+
"Action": [
70+
"events:ListTargetsByRule",
71+
"events:DescribeRule"
72+
],
73+
"Resource": "arn:aws:events:*:*:rule/AWSEC2SqlHa*",
74+
"Effect": "Allow",
75+
"Sid": "AllowEventsNonMutatingManagedRule"
76+
}
77+
]
78+
},
79+
"IsDefaultVersion": true
80+
}
81+
}

0 commit comments

Comments
 (0)