-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjenkins-ec2-agents.config.yaml
58 lines (56 loc) · 1.33 KB
/
jenkins-ec2-agents.config.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
linux_ami: 'Amzn2_Linux_Jenkins_Agent-*'
iam_policies:
sts:
action:
- sts:AssumeRole
ecr-mamange-repos:
action:
- ecr:*
s3-list-ciinabox-bucket:
action:
- s3:ListBucket
resource:
- Fn::Sub: arn:aws:s3:::${S3Bucket}
s3-rw:
action:
- s3:GetObject
- s3:GetObjectAcl
- s3:GetObjectVersion
- s3:PutObject
- s3:PutObjectAcl
resource:
- Fn::Sub: arn:aws:s3:::${S3Bucket}/*
ssm-ssh-access:
action:
- ssm:UpdateInstanceInformation
- ssm:ListInstanceAssociations
- ec2messages:GetMessages
- ssmmessages:CreateControlChannel
- ssmmessages:CreateDataChannel
- ssmmessages:OpenControlChannel
- ssmmessages:OpenDataChannel
ami_finder_custom_resources:
custom_policies:
ami:
action:
- ec2:DescribeImages
resource: '*'
lambda:
action:
- lambda:InvokeFunction
resource:
Fn::Sub: arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:AmiFinderCR
roles:
AmiFinderResource:
policies_inline:
- cloudwatch-logs
- ami
- lambda
functions:
AmiFinderCR:
code: ami_finder/app.py
handler: app.handler
runtime: python3.11
timeout: 600
role: AmiFinderResource
package_cmd: 'pip install -r requirements.txt -t .'