-
Notifications
You must be signed in to change notification settings - Fork 1
/
execution-role.template.yaml
70 lines (70 loc) · 2.48 KB
/
execution-role.template.yaml
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
AWSTemplateFormatVersion: "2010-09-09"
Resources:
ExecutionRole:
Type: AWS::IAM::Role
Properties:
MaxSessionDuration: 8400
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: [resources.cloudformation.amazonaws.com, cloudformation.amazonaws.com, lambda.amazonaws.com]
Action: sts:AssumeRole
Path: "/"
Policies:
- PolicyName: ResourceTypePolicy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- "sts:GetCallerIdentity"
- "eks:CreateCluster"
- "eks:DeleteCluster"
- "eks:DescribeCluster"
- "eks:ListTagsForResource"
- "eks:UpdateClusterVersion"
- "eks:UpdateClusterConfig"
- "eks:TagResource"
- "eks:UntagResource"
- "iam:PassRole"
- "sts:AssumeRole"
- "lambda:UpdateFunctionConfiguration"
- "lambda:DeleteFunction"
- "lambda:GetFunction"
- "lambda:InvokeFunction"
- "lambda:CreateFunction"
- "lambda:UpdateFunctionCode"
- "ec2:DescribeVpcs"
- "ec2:DescribeSubnets"
- "ec2:DescribeSecurityGroups"
- "kms:CreateGrant"
- "kms:DescribeKey"
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:DescribeLogGroups"
- "logs:DescribeLogStreams"
- "logs:PutLogEvents"
- "cloudwatch:ListMetrics"
- "cloudwatch:PutMetricData"
Resource: "*"
VpcProxyRole:
Type: AWS::IAM::Role
Properties:
RoleName: CloudFormation-Kubernetes-VPC
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action: sts:AssumeRole
Path: "/"
ManagedPolicyArns:
- !Sub 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaENIManagementAccess'
- !Sub 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
Outputs:
ExecutionRoleArn:
Value: !GetAtt ExecutionRole.Arn