Skip to content

Commit 7b488b4

Browse files
Split the stack integration role into read+write policies. Fix the PassRole policy.
1 parent 89b5b01 commit 7b488b4

2 files changed

Lines changed: 27 additions & 18 deletions

File tree

cloudformation/.DS_Store

6 KB
Binary file not shown.

cloudformation/full/better-stack-full.yaml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -256,42 +256,28 @@ Resources:
256256
PolicyDocument:
257257
Version: '2012-10-17'
258258
Statement:
259-
- Sid: CloudWatchAccess
259+
- Sid: CloudWatchRead
260260
Effect: Allow
261261
Action:
262262
- cloudwatch:Describe*
263263
- cloudwatch:Get*
264264
- cloudwatch:List*
265-
- cloudwatch:PutMetricStream
266-
- cloudwatch:DeleteMetricStream
267-
- cloudwatch:StartMetricStreams
268-
- cloudwatch:StopMetricStreams
269265
Resource: '*'
270-
- Sid: LogsAccess
266+
- Sid: LogsRead
271267
Effect: Allow
272268
Action:
273269
- logs:Describe*
274270
- logs:Get*
275271
- logs:List*
276272
- logs:FilterLogEvents
277273
- logs:TestMetricFilter
278-
- logs:PutSubscriptionFilter
279-
- logs:DeleteSubscriptionFilter
280274
Resource: '*'
281-
- Sid: PassLogsSubscriptionRole
282-
Effect: Allow
283-
Action:
284-
- iam:PassRole
285-
Resource: !Sub 'arn:aws:iam::${AWS::AccountId}:role/better-stack-logs-subscription-role'
286-
Condition:
287-
StringEquals:
288-
iam:PassedToService: logs.amazonaws.com
289-
- Sid: EC2Access
275+
- Sid: EC2Read
290276
Effect: Allow
291277
Action:
292278
- ec2:Describe*
293279
Resource: '*'
294-
- Sid: TaggingAccess
280+
- Sid: TaggingRead
295281
Effect: Allow
296282
Action:
297283
- tag:GetResources
@@ -365,6 +351,29 @@ Resources:
365351
- cloudtrail:ListTrails
366352
- health:Describe*
367353
Resource: '*'
354+
- PolicyName: BetterStackWriteAccess
355+
PolicyDocument:
356+
Version: '2012-10-17'
357+
Statement:
358+
- Sid: MetricStreamManagement
359+
Effect: Allow
360+
Action:
361+
- cloudwatch:PutMetricStream
362+
- cloudwatch:DeleteMetricStream
363+
- cloudwatch:StartMetricStreams
364+
- cloudwatch:StopMetricStreams
365+
Resource: '*'
366+
- Sid: LogsSubscriptionManagement
367+
Effect: Allow
368+
Action:
369+
- logs:PutSubscriptionFilter
370+
- logs:DeleteSubscriptionFilter
371+
Resource: '*'
372+
- Sid: PassLogsSubscriptionRole
373+
Effect: Allow
374+
Action:
375+
- iam:PassRole
376+
Resource: !Sub 'arn:aws:iam::${AWS::AccountId}:role/better-stack-logs-subscription-role'
368377
Tags:
369378
- Key: Solution
370379
Value: BetterStack

0 commit comments

Comments
 (0)