Skip to content

Commit 6de6a13

Browse files
authored
Create aws-ssm-ec2-proxy-command-iam-policy--ec2-instance-connect.json
1 parent 343f302 commit 6de6a13

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": "ec2-instance-connect:SendSSHPublicKey",
7+
"Resource": [
8+
"arn:aws:ec2:*:*:instance/*"
9+
],
10+
"Condition": {
11+
"StringEquals": {
12+
"ec2:osuser": "ec2-user"
13+
}
14+
}
15+
},
16+
{
17+
"Effect": "Allow",
18+
"Action": [
19+
"ssm:StartSession"
20+
],
21+
"Resource": [
22+
"arn:aws:ec2:*:*:instance/*",
23+
"arn:aws:ssm:region:account-id:document/AWS-StartSSHSession"
24+
],
25+
"Condition": {
26+
"BoolIfExists": {
27+
"ssm:SessionDocumentAccessCheck": "true"
28+
}
29+
}
30+
},
31+
{
32+
"Effect": "Allow",
33+
"Action": [
34+
"ssm:DescribeSessions",
35+
"ssm:GetConnectionStatus",
36+
"ssm:DescribeInstanceProperties",
37+
"ec2:DescribeInstances"
38+
],
39+
"Resource": "*"
40+
},
41+
{
42+
"Effect": "Allow",
43+
"Action": [
44+
"ssm:TerminateSession"
45+
],
46+
"Resource": [
47+
"arn:aws:ssm:*:*:session/${aws:username}-*"
48+
]
49+
}
50+
]
51+
}

0 commit comments

Comments
 (0)