File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ AWSTemplateFormatVersion : " 2010-09-09"
2
+ Description : " DDB Table and IAM Managed Policies/Role for AWS KMS Hierarchical Keyring Testing"
3
+
4
+ Parameters :
5
+ ProjectName :
6
+ Type : String
7
+ Description : A prefix that will be applied to any names
8
+ Default : DDBEC-Python
9
+ GitHubRepo :
10
+ Type : String
11
+ Description : GitHub Repo that invokes CI
12
+ Default : aws/aws-dynamodb-encryption-python
13
+
14
+ Resources :
15
+ GitHubCIRole :
16
+ Type : ' AWS::IAM::Role'
17
+ Properties :
18
+ RoleName : !Sub "GitHub-CI-${ProjectName}-Role-${AWS::Region}"
19
+ Description : " Access KMS Resources for CI from GitHub"
20
+ ManagedPolicyArns :
21
+ - " arn:aws:iam::370957321024:policy/KMS-Public-CMK-EncryptDecrypt-Key-Access"
22
+ AssumeRolePolicyDocument : !Sub |
23
+ {
24
+ "Version": "2012-10-17",
25
+ "Statement": [
26
+ {
27
+ "Effect": "Allow",
28
+ "Principal": { "Federated": "arn:aws:iam::${AWS::AccountId}:oidc-provider/token.actions.githubusercontent.com" },
29
+ "Action": "sts:AssumeRoleWithWebIdentity",
30
+ "Condition": {
31
+ "StringEquals": {
32
+ "token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
33
+ },
34
+ "StringLike": {
35
+ "token.actions.githubusercontent.com:sub": "repo:${GitHubRepo}:*"
36
+ }
37
+ }
38
+ },
39
+ {
40
+ "Effect": "Allow",
41
+ "Principal": {
42
+ "AWS": "*"
43
+ },
44
+ "Action": "sts:AssumeRole",
45
+ "Condition": {
46
+ "StringEquals": {
47
+ "aws:PrincipalArn": [
48
+ "arn:aws:iam::${AWS::AccountId}:role/ToolsDevelopment"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ ]
54
+ }
You can’t perform that action at this time.
0 commit comments