-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpanther-bi-iam-permissions.yml
86 lines (79 loc) · 2.62 KB
/
panther-bi-iam-permissions.yml
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
82
83
84
85
86
# Copyright (C) 2022 Panther Labs, Inc.
#
# The Panther SaaS is licensed under the terms of the Panther Enterprise Subscription
# Agreement available at https://panther.com/enterprise-subscription-agreement/.
# All intellectual property rights in and to the Panther SaaS, including any and all
# rights to access the Panther SaaS, are governed by the Panther Enterprise Subscription Agreement.
AWSTemplateFormatVersion: 2010-09-09
Description: Athena Third Party BI Tool Permissions (Create access key post deployment for IAM user created).
Parameters:
UserName:
Type: String
Default: PantherAthenaBI
Description: Enter a name for the IAM user that will be created.
RootStackName:
Type: String
Default: panther
Description: Enter the Panther Root Stack Name.
Resources:
Athena:
Type: AWS::IAM::User
Properties:
UserName: !Ref UserName
AthenaGroupMembership:
Type: AWS::IAM::UserToGroupAddition
Properties:
GroupName: !Ref AthenaGroup
Users:
- !Ref Athena
AthenaGroup:
Type: AWS::IAM::Group
Properties:
GroupName: AthenaAnalytics
AthenaGroupPolicy:
Type: AWS::IAM::Policy
Properties:
PolicyName: ReadPantherProcessedData
Groups:
- !Ref AthenaGroup
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- athena:BatchGetQueryExecution
- athena:CancelQueryExecution
- athena:Get*
- athena:List*
- athena:RunQuery
- athena:StartQueryExecution
- athena:StopQueryExecution
Resource: '*'
- Effect: Allow
Action:
- glue:BatchGetPartition
- glue:Get*
Resource: '*'
- Effect: Allow
Action:
- s3:AbortMultipartUpload
- s3:GetBucketLocation
- s3:GetObject
- s3:ListBucket
- s3:ListBucketMultipartUploads
- s3:ListMultipartUploadParts
- s3:PutObject
Resource:
- !Sub arn:${AWS::Partition}:s3:::${RootStackName}-*-athenaresults-*
- !Sub arn:${AWS::Partition}:s3:::${RootStackName}-*-processeddata-*
- !Sub arn:${AWS::Partition}:s3:::${RootStackName}-*-historicaldata-*
- Effect: Allow
Action: s3:ListAllMyBuckets
Resource: '*'
- Effect: Allow
Action: lakeformation:GetDataAccess
Resource: '*'
Outputs:
IAMUser:
Description: Panther Athena BI tool integration IAM user.
Value: !Ref Athena