Skip to content

Commit 627e8c6

Browse files
authored
[IT-4244] update SSO ImageCentralAmiLibrarian policy (#1332)
We switch from using packer to using the AWS image builder to build AMIs (in issue IT-3831). This change requires AMI librarians to have a different set of access to build and deploy AMIs with cloudformation templates. Note: This new least privileged policy was auto generated using the aws-leastprivilege[1] app. [1] https://github.com/iann0036/aws-leastprivilege
1 parent 9b32d9e commit 627e8c6

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

org-formation/700-aws-sso/_tasks.yaml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,54 @@ SsoImageCentralAmiLibrarian:
11001100
permissionSetName: 'AMI-Librarian'
11011101
managedPolicies:
11021102
- 'arn:aws:iam::aws:policy/AmazonEC2FullAccess'
1103-
- 'arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore'
1103+
- 'arn:aws:iam::aws:policy/AmazonS3FullAccess'
1104+
- 'arn:aws:iam::aws:policy/AWSCloudFormationFullAccess'
11041105
sessionDuration: 'PT12H'
1106+
inlinePolicy: >-
1107+
{
1108+
"Version": "2012-10-17",
1109+
"Statement": [
1110+
{
1111+
"Sid": "InstanceRoleAccess",
1112+
"Effect": "Allow",
1113+
"Action": [
1114+
"iam:CreateRole",
1115+
"iam:AttachRolePolicy",
1116+
"iam:DetachRolePolicy",
1117+
"iam:DeleteRole"
1118+
],
1119+
"Resource": "arn:aws:iam::867686887310:role/executionServiceEC2Role/*"
1120+
},
1121+
{
1122+
"Sid": "InstanceProfileAccess",
1123+
"Effect": "Allow",
1124+
"Action": [
1125+
"iam:AddRoleToInstanceProfile",
1126+
"iam:CreateInstanceProfile",
1127+
"iam:GetInstanceProfile",
1128+
"iam:PassRole",
1129+
"iam:DeleteInstanceProfile",
1130+
"iam:GetInstanceProfile",
1131+
"iam:RemoveRoleFromInstanceProfile"
1132+
],
1133+
"Resource": "*"
1134+
},
1135+
{
1136+
"Sid": "ImageInfrastructureConfigurationAccess",
1137+
"Effect": "Allow",
1138+
"Action": [
1139+
"iam:CreateServiceLinkedRole",
1140+
"iam:GetInstanceProfile",
1141+
"iam:GetRole",
1142+
"iam:PassRole",
1143+
"sns:Publish",
1144+
"ecr:BatchGetRepositoryScanningConfiguration",
1145+
"inspector2:BatchGetAccountStatus"
1146+
],
1147+
"Resource": "*"
1148+
}
1149+
]
1150+
}
11051151
11061152
SsoBridgeDevAdmin:
11071153
Type: update-stacks

0 commit comments

Comments
 (0)