@@ -26,7 +26,7 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
26
26
27
27
{{< expand "View RedisLabsInstanceRolePolicy.json" >}}
28
28
``` js
29
- {
29
+ {
30
30
" Version" : " 2012-10-17" ,
31
31
" Statement" : [
32
32
{
@@ -84,19 +84,19 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
84
84
]
85
85
},
86
86
{
87
- " Sid" : " TagResourcesDelete" ,
88
- " Effect" : " Allow" ,
89
- " Action" : [
87
+ " Sid" : " TagResourcesDelete" ,
88
+ " Effect" : " Allow" ,
89
+ " Action" : [
90
90
" ec2:DeleteTags"
91
- ],
92
- " Resource" : [
91
+ ],
92
+ " Resource" : [
93
93
" *"
94
- ],
95
- " Condition" : {
96
- " StringEquals" : {
97
- " ec2:ResourceTag/RedisLabsIdentifier" : " Redislabs-VPC"
98
- }
99
- }
94
+ ],
95
+ " Condition" : {
96
+ " StringEquals" : {
97
+ " ec2:ResourceTag/RedisLabsIdentifier" : " Redislabs-VPC"
98
+ }
99
+ }
100
100
}
101
101
]
102
102
}
@@ -152,7 +152,11 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
152
152
" ec2:DescribeInternetGateways" ,
153
153
" ec2:DescribeImages" ,
154
154
" ec2:DescribeTransitGatewayVpcAttachments" ,
155
- " ec2:DescribeVpcPeeringConnections"
155
+ " ec2:DescribeVpcPeeringConnections" ,
156
+ " ec2:DescribeKeyPairs" ,
157
+ " ec2:DescribeTransitGateways" ,
158
+ " ec2:DescribeInstanceStatus" ,
159
+ " ec2:DescribeNetworkAcls"
156
160
],
157
161
"Resource" : " *"
158
162
},
@@ -164,12 +168,7 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
164
168
" cloudwatch:Get*" ,
165
169
" cloudwatch:List*"
166
170
],
167
- "Resource" : " *" ,
168
- "Condition" : {
169
- "StringEquals" : {
170
- "ec2:ResourceTag/RedisLabsIdentifier" : " Redislabs-VPC"
171
- }
172
- }
171
+ "Resource" : " *"
173
172
},
174
173
{
175
174
"Sid" : " IamUserOperations" ,
@@ -182,27 +181,26 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
182
181
"Resource" : " arn:aws:iam::*:user/${aws:username}"
183
182
},
184
183
{
185
- "Sid" : " PassRlClusterNodeRole" ,
186
- "Effect" : " Allow" ,
187
- "Action" : " iam:PassRole" ,
188
- "Resource" : " arn:aws:iam::*:role/redislabs-cluster-node-role"
189
- },
190
- {
191
- "Sid" : " IAMRoleReadAccess" ,
192
- "Effect" : " Allow" ,
184
+ "Sid" : " RolePolicyUserReadActions" ,
193
185
"Action" : [
194
186
" iam:GetRole" ,
195
187
" iam:GetPolicy" ,
188
+ " iam:ListUsers" ,
189
+ " iam:ListPolicies" ,
196
190
" iam:ListRolePolicies" ,
197
191
" iam:ListAttachedRolePolicies" ,
198
192
" iam:ListInstanceProfiles" ,
199
193
" iam:ListInstanceProfilesForRole" ,
200
194
" iam:SimulatePrincipalPolicy"
201
195
],
202
- "Resource" : [
203
- " arn:aws:iam::*:role/Redislabs-*" ,
204
- " arn:aws:iam::*:policy/Redislabs-*"
205
- ]
196
+ "Effect" : " Allow" ,
197
+ "Resource" : " *"
198
+ },
199
+ {
200
+ "Sid" : " PassRlClusterNodeRole" ,
201
+ "Effect" : " Allow" ,
202
+ "Action" : " iam:PassRole" ,
203
+ "Resource" : " arn:aws:iam::*:role/redislabs-cluster-node-role"
206
204
},
207
205
{
208
206
"Sid" : " CreateEc2ResourcesWithoutTag" ,
@@ -216,7 +214,13 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
216
214
" ec2:CreateSecurityGroup" ,
217
215
" ec2:CreateInternetGateway" ,
218
216
" ec2:CreateRouteTable" ,
219
- " ec2:CreateSubnet"
217
+ " ec2:CreateSubnet" ,
218
+ " ec2:CreateSnapshot" ,
219
+ " ec2:CreateTransitGateway" ,
220
+ " ec2:AssociateVpcCidrBlock" ,
221
+ " ec2:CreateTransitGatewayVpcAttachment" ,
222
+ " ec2:AttachInternetGateway" ,
223
+ " ec2:ReplaceRoute"
220
224
],
221
225
"Resource" : " *"
222
226
},
@@ -238,19 +242,6 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
238
242
}
239
243
}
240
244
},
241
- {
242
- "Sid" : " DenyCreateVpcWithoutRequiredTag" ,
243
- "Effect" : " Deny" ,
244
- "Action" : [
245
- " ec2:CreateVpc"
246
- ],
247
- "Resource" : " *" ,
248
- "Condition" : {
249
- "Null" : {
250
- "aws:RequestTag/RedisLabsIdentifier" : " true"
251
- }
252
- }
253
- },
254
245
{
255
246
"Sid" : " AllowVpcPeeringManagement" ,
256
247
"Effect" : " Allow" ,
@@ -278,9 +269,6 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
278
269
"Effect" : " Allow" ,
279
270
"Action" : [
280
271
" ec2:CreateVolume" ,
281
- " ec2:CreateSnapshot" ,
282
- " ec2:ImportKeyPair" ,
283
- " ec2:AttachInternetGateway" ,
284
272
" ec2:CreateRoute" ,
285
273
" ec2:AuthorizeSecurityGroupIngress" ,
286
274
" ec2:AuthorizeSecurityGroupEgress"
@@ -325,7 +313,6 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
325
313
" ec2:DeleteSecurityGroup" ,
326
314
" ec2:DeleteRouteTable" ,
327
315
" ec2:DeleteRoute" ,
328
- " ec2:DetachInternetGateway" ,
329
316
" ec2:DeleteInternetGateway" ,
330
317
" ec2:DeleteVpc"
331
318
],
@@ -336,6 +323,18 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
336
323
}
337
324
}
338
325
},
326
+ {
327
+ "Sid" : " DeleteEc2ResourcesWithoutTag" ,
328
+ "Effect" : " Allow" ,
329
+ "Action" : [
330
+ " ec2:RevokeSecurityGroupIngress" ,
331
+ " ec2:RejectVpcPeeringConnection" ,
332
+ " ec2:DeleteTransitGatewayVpcAttachment" ,
333
+ " ec2:DeleteTransitGateway" ,
334
+ " ec2:DetachInternetGateway"
335
+ ],
336
+ "Resource" : " *"
337
+ },
339
338
{
340
339
"Sid" : " CreateAndChangeServiceLinkedRoleForTransitGateway" ,
341
340
"Effect" : " Allow" ,
@@ -348,12 +347,37 @@ Follow the steps to [create an IAM policy using the JSON editor](https://docs.aw
348
347
}
349
348
},
350
349
{
350
+ "Sid" : " RolePolicyForTransitGateway" ,
351
351
"Effect" : " Allow" ,
352
352
"Action" : [
353
353
" iam:AttachRolePolicy" ,
354
354
" iam:PutRolePolicy"
355
355
],
356
356
"Resource" : " arn:aws:iam::*:role/aws-service-role/transitgateway.amazonaws.com/AWSServiceRoleForVPCTransitGateway*"
357
+ },
358
+ {
359
+ "Sid" : " AllowEncryptedVolumeCreation" ,
360
+ "Effect" : " Allow" ,
361
+ "Action" : [
362
+ " kms:GenerateDataKeyWithoutPlaintext" ,
363
+ " kms:DescribeKey"
364
+ ],
365
+ "Resource" : " *"
366
+ },
367
+ {
368
+ "Sid" : " AllowAttachDetachOfEncryptedVolumes" ,
369
+ "Effect" : " Allow" ,
370
+ "Action" : [
371
+ " kms:CreateGrant" ,
372
+ " kms:ListGrants" ,
373
+ " kms:RevokeGrant"
374
+ ],
375
+ "Resource" : " *" ,
376
+ "Condition" : {
377
+ "Bool" : {
378
+ "kms:GrantIsForAWSResource" : " true"
379
+ }
380
+ }
357
381
}
358
382
]
359
383
}
0 commit comments