forked from SummitRoute/aws_managed_policies
-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MAMIP Bot
committed
Nov 18, 2024
1 parent
46c3909
commit 2631cef
Showing
12 changed files
with
1,436 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"PolicyVersion": { | ||
"CreateDate": "2024-11-15T23:31:17Z", | ||
"VersionId": "v1", | ||
"Document": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"s3:PutObject", | ||
"s3:GetObject", | ||
"s3:DeleteObject" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*/actions/*/${aws:PrincipalAccount}/*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceAccount": "${aws:PrincipalAccount}" | ||
} | ||
}, | ||
"Sid": "AllowReadWriteToSsmDiagnosisBucketInSameAccount" | ||
}, | ||
{ | ||
"Action": [ | ||
"s3:PutObject", | ||
"s3:GetObject", | ||
"s3:DeleteObject" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*/actions/*/${aws:PrincipalAccount}/*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceOrgId": "${aws:PrincipalOrgId}" | ||
} | ||
}, | ||
"Sid": "AllowReadWriteToSsmDiagnosisBucketWithinOrg" | ||
}, | ||
{ | ||
"Action": [ | ||
"s3:ListBucket" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringLike": { | ||
"s3:prefix": "*/${aws:PrincipalAccount}/*" | ||
}, | ||
"StringEquals": { | ||
"aws:ResourceAccount": "${aws:PrincipalAccount}" | ||
} | ||
}, | ||
"Sid": "AllowReadOnlyAccessListBucketOnSsmDiagnosisBucketInSameAccount" | ||
}, | ||
{ | ||
"Action": [ | ||
"s3:ListBucket" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringLike": { | ||
"s3:prefix": "*/${aws:PrincipalAccount}/*" | ||
}, | ||
"StringEquals": { | ||
"aws:ResourceOrgId": "${aws:PrincipalOrgId}" | ||
} | ||
}, | ||
"Sid": "AllowReadOnlyAccessListBucketOnSsmDiagnosisBucketWithinOrg" | ||
}, | ||
{ | ||
"Action": [ | ||
"s3:GetEncryptionConfiguration" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceAccount": "${aws:PrincipalAccount}" | ||
} | ||
}, | ||
"Sid": "AllowGetEncryptionConfigurationOnSsmDiagnosisBucketInSameAccount" | ||
}, | ||
{ | ||
"Action": [ | ||
"s3:GetEncryptionConfiguration" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceOrgId": "${aws:PrincipalOrgId}" | ||
} | ||
}, | ||
"Sid": "AllowGetEncryptionConfigurationOnSsmDiagnosisBucketWithinOrg" | ||
} | ||
] | ||
}, | ||
"IsDefaultVersion": true | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
policies/AWS-SSM-DiagnosisAutomation-AdministrationRolePolicy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"PolicyVersion": { | ||
"CreateDate": "2024-11-16T00:01:45Z", | ||
"VersionId": "v1", | ||
"Document": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"ssm:DescribeAutomationExecutions", | ||
"ssm:DescribeAutomationStepExecutions", | ||
"ssm:GetAutomationExecution" | ||
], | ||
"Resource": "*", | ||
"Effect": "Allow", | ||
"Sid": "AllowReadOnlyAccessSSMResource" | ||
}, | ||
{ | ||
"Action": [ | ||
"ssm:StartAutomationExecution" | ||
], | ||
"Resource": [ | ||
"arn:aws:ssm:*:*:automation-definition/AWS-*UnmanagedEC2*:*" | ||
], | ||
"Effect": "Allow", | ||
"Sid": "AllowExecuteSSMAutomation" | ||
}, | ||
{ | ||
"Action": [ | ||
"kms:Decrypt", | ||
"kms:GenerateDataKey" | ||
], | ||
"Resource": "arn:aws:kms:*:*:key/*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringLike": { | ||
"kms:ViaService": "s3.*.amazonaws.com" | ||
}, | ||
"ArnLike": { | ||
"kms:EncryptionContext:aws:s3:arn": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*" | ||
}, | ||
"StringEquals": { | ||
"aws:ResourceTag/SystemsManagerManaged": "true" | ||
}, | ||
"Bool": { | ||
"aws:ViaAWSService": "true" | ||
} | ||
}, | ||
"Sid": "AllowKMSOperations" | ||
}, | ||
{ | ||
"Action": "sts:AssumeRole", | ||
"Resource": "arn:aws:iam::*:role/AWS-SSM-DiagnosisExecutionRole*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceAccount": "${aws:PrincipalAccount}" | ||
} | ||
}, | ||
"Sid": "AllowAssumeDiagnosisExecutionRoleWithinAccount" | ||
}, | ||
{ | ||
"Action": "iam:PassRole", | ||
"Resource": "arn:aws:iam::*:role/AWS-SSM-DiagnosisAdminRole*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"iam:PassedToService": "ssm.amazonaws.com" | ||
} | ||
}, | ||
"Sid": "AllowPassRoleOnSelfToSsm" | ||
}, | ||
{ | ||
"Action": [ | ||
"s3:PutObject", | ||
"s3:GetObject", | ||
"s3:DeleteObject" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*/actions/*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceAccount": "${aws:PrincipalAccount}" | ||
} | ||
}, | ||
"Sid": "AllowReadWriteToSsmDiagnosisBucketInSameAccount" | ||
}, | ||
{ | ||
"Action": [ | ||
"s3:ListBucket" | ||
], | ||
"Resource": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceAccount": "${aws:PrincipalAccount}" | ||
} | ||
}, | ||
"Sid": "AllowListBucketOnSsmDiagnosisBucketInSameAccount" | ||
} | ||
] | ||
}, | ||
"IsDefaultVersion": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"PolicyVersion": { | ||
"CreateDate": "2024-11-16T00:08:07Z", | ||
"VersionId": "v1", | ||
"Document": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"ec2:DescribeVpcs", | ||
"ec2:DescribeVpcAttribute", | ||
"ec2:DescribeVpcEndpoints", | ||
"ec2:DescribeSubnets", | ||
"ec2:DescribeSecurityGroups", | ||
"ec2:DescribeInstances", | ||
"ec2:DescribeInternetGateways" | ||
], | ||
"Resource": "*", | ||
"Effect": "Allow", | ||
"Sid": "AllowReadOnlyAccessEC2Resource" | ||
}, | ||
{ | ||
"Action": [ | ||
"ssm:DescribeAutomationStepExecutions", | ||
"ssm:DescribeInstanceInformation", | ||
"ssm:DescribeAutomationExecutions", | ||
"ssm:GetAutomationExecution" | ||
], | ||
"Resource": "*", | ||
"Effect": "Allow", | ||
"Sid": "AllowReadOnlyAccessSSMResource" | ||
}, | ||
{ | ||
"Action": [ | ||
"ssm:StartAutomationExecution" | ||
], | ||
"Resource": [ | ||
"arn:aws:ssm:*:*:automation-definition/AWS-*UnmanagedEC2*:*" | ||
], | ||
"Effect": "Allow", | ||
"Sid": "AllowExecuteSSMAutomation" | ||
}, | ||
{ | ||
"Action": [ | ||
"kms:Decrypt", | ||
"kms:GenerateDataKey" | ||
], | ||
"Resource": "arn:aws:kms:*:*:key/*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringLike": { | ||
"kms:ViaService": "s3.*.amazonaws.com" | ||
}, | ||
"ArnLike": { | ||
"kms:EncryptionContext:aws:s3:arn": "arn:aws:s3:::do-not-delete-ssm-diagnosis-*" | ||
}, | ||
"StringEquals": { | ||
"aws:ResourceTag/SystemsManagerManaged": "true" | ||
}, | ||
"Bool": { | ||
"aws:ViaAWSService": "true" | ||
} | ||
}, | ||
"Sid": "AllowKMSOperations" | ||
}, | ||
{ | ||
"Action": "iam:PassRole", | ||
"Resource": "arn:aws:iam::*:role/AWS-SSM-DiagnosisExecutionRole*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"iam:PassedToService": "ssm.amazonaws.com" | ||
} | ||
}, | ||
"Sid": "AllowPassRoleOnSelfToSsm" | ||
} | ||
] | ||
}, | ||
"IsDefaultVersion": true | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
policies/AWS-SSM-DiagnosisAutomation-OperationalAccountAdministrationRolePolicy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"PolicyVersion": { | ||
"CreateDate": "2024-11-16T00:11:14Z", | ||
"VersionId": "v1", | ||
"Document": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"organizations:ListRoots", | ||
"organizations:ListChildren" | ||
], | ||
"Resource": "*", | ||
"Effect": "Allow", | ||
"Sid": "AllowReadOnlyAccessOrganization" | ||
}, | ||
{ | ||
"Action": "sts:AssumeRole", | ||
"Resource": "arn:aws:iam::*:role/AWS-SSM-DiagnosisExecutionRole*", | ||
"Effect": "Allow", | ||
"Condition": { | ||
"StringEquals": { | ||
"aws:ResourceOrgId": "${aws:PrincipalOrgId}" | ||
} | ||
}, | ||
"Sid": "AllowAssumeDiagnosisExecutionRoleWithinOrg" | ||
} | ||
] | ||
}, | ||
"IsDefaultVersion": true | ||
} | ||
} |
Oops, something went wrong.