AWSCodeStarServiceRole
Last Modified
Sep 8, 2026
September 8, 2026 at 01:03 PM UTC
Version
v12
Total Versions
10
Created
Sep 8, 2026
Actions
65
Risk
HighAn unrestricted escalation path, identity administration, secret reads or the power to switch off security monitoring. Read from this policy document alone: trust policies, boundaries and SCPs in your account still decide what actually succeeds. How this is assessed
- High
Can take over existing resources that run as another role
Grants every action of 6 documented escalation paths on any resource with no condition, and 1 more in a scoped form.
- cloudformation:UpdateStack (via cloudformation:*Stack*): on arn:aws:cloudformation:*:*:stack/awscodestar-*, arn:aws:cloudformation:*:*:stack/awseb-*, arn:aws:cloudformation:*:*:stack/aws-cloud9-*
Use with caution: List the roles attached to the functions, instances, pipelines or notebooks it can modify: the holder effectively has them too.
- Medium
Can grant itself more permissions
Grants the actions of 4 documented escalation paths, but only on named resources or under a condition. Review that scope before trusting it.
- iam:CreatePolicyVersion: on arn:aws:iam::*:policy/CodeStar_*
- iam:PutRolePolicy: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
- iam:AttachUserPolicy: condition iam:PolicyArn
- iam:AttachRolePolicy: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
Use with caution: Check which roles, users or policies fall inside the scope shown above. Within it the escalation works as documented, so keep privileged principals out of it.
- Medium
Can launch resources that run as a more privileged role
Grants the actions of 8 documented escalation paths, but only on named resources or under a condition. Review that scope before trusting it.
- iam:PassRole: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
- cloudformation:CreateStack (via cloudformation:*Stack*): on arn:aws:cloudformation:*:*:stack/awscodestar-*, arn:aws:cloudformation:*:*:stack/awseb-*, arn:aws:cloudformation:*:*:stack/aws-cloud9-*
- cloudformation-003iam:PassRole + cloudformation:CreateStackSet + cloudformation:CreateStackInstancesscoped
- iam:PassRole: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
- cloudformation:CreateStackSet (via cloudformation:*Stack*): on arn:aws:cloudformation:*:*:stack/awscodestar-*, arn:aws:cloudformation:*:*:stack/awseb-*, arn:aws:cloudformation:*:*:stack/aws-cloud9-*
- cloudformation:CreateStackInstances (via cloudformation:*Stack*): on arn:aws:cloudformation:*:*:stack/awscodestar-*, arn:aws:cloudformation:*:*:stack/awseb-*, arn:aws:cloudformation:*:*:stack/aws-cloud9-*
- iam:PassRole: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
- cloudformation:UpdateStackSet (via cloudformation:*Stack*): on arn:aws:cloudformation:*:*:stack/awscodestar-*, arn:aws:cloudformation:*:*:stack/awseb-*, arn:aws:cloudformation:*:*:stack/aws-cloud9-*
- cloudformation:CreateChangeSet: on arn:aws:cloudformation:*:*:stack/awscodestar-*, arn:aws:cloudformation:*:*:stack/awseb-*, arn:aws:cloudformation:*:*:stack/aws-cloud9-*
- cloudformation:ExecuteChangeSet: on arn:aws:cloudformation:*:*:stack/awscodestar-*, arn:aws:cloudformation:*:*:stack/awseb-*, arn:aws:cloudformation:*:*:stack/aws-cloud9-*
- iam:PassRole: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
- iam:PassRole: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
- iam:PassRole: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
- iam:PassRole: on arn:aws:iam::*:role/CodeStarWorker*, arn:aws:iam::*:policy/CodeStarWorker*, arn:aws:iam::*:instance-profile/awscodestar-*
Use with caution: Check which roles, users or policies fall inside the scope shown above. Within it the escalation works as documented, so keep privileged principals out of it.
- Medium
Can switch off security monitoring
Can delete VPC flow logs, delete CloudWatch log groups, which is how an intruder hides.
ec2:DeleteFlowLogs (via ec2:*)logs:DeleteLogGroup (via logs:*)Use with caution: Deny these actions with an SCP for everyone outside a break-glass role, so no single policy can blind you.
- Medium
Can rewrite resource policies and sharing
Grants 19 permissions management actions across 4 services (codebuild, ec2, logs, sns) on any resource, enough to share resources outside the account.
codebuild:deleteresourcepolicycodebuild:putresourcepolicyec2:createcoippoolpermissionec2:createlocalgatewayroutetablepermissionec2:createnetworkinterfacepermissionec2:deletecoippoolpermissionec2:deletelocalgatewayroutetablepermissionec2:deletenetworkinterfacepermissionec2:deleteresourcepolicyec2:disableimageblockpublicaccessec2:disablesnapshotblockpublicaccessec2:enableimageblockpublicaccessand 7 moreUse with caution: Turn on IAM Access Analyzer external access findings, and keep account-level guards like S3 Block Public Access enabled.
- Medium
Full access to 11 services on every resource
Uses autoscaling:*, codebuild:*, codecommit:*, codedeploy:*, codepipeline:*, codestar:*, ec2:*, elasticbeanstalk:* and 3 more with Resource "*" and no condition, so every action AWS adds to those services later is granted too.
autoscaling:*codebuild:*codecommit:*codedeploy:*codepipeline:*codestar:*ec2:*elasticbeanstalk:*elasticloadbalancing:*logs:*sns:*Use with caution: The grant grows every time the service does. For long-lived access, prefer a policy that lists the actions you actually need.
Policy Document
View on GitHub{
"PolicyVersion": {
"Document": {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ProjectEventRules",
"Effect": "Allow",
"Action": [
"events:PutTargets",
"events:RemoveTargets",
"events:PutRule",
"events:DeleteRule",
"events:DescribeRule"
],
"Resource": [
"arn:aws:events:*:*:rule/awscodestar-*"
]
},
{
"Sid": "ProjectStack",
"Effect": "Allow",
"Action": [
"cloudformation:*Stack*",
"cloudformation:CreateChangeSet",
"cloudformation:ExecuteChangeSet",
"cloudformation:DeleteChangeSet",
"cloudformation:GetTemplate"
],
"Resource": [
"arn:aws:cloudformation:*:*:stack/awscodestar-*",
"arn:aws:cloudformation:*:*:stack/awseb-*",
"arn:aws:cloudformation:*:*:stack/aws-cloud9-*",
"arn:aws:cloudformation:*:aws:transform/CodeStar*"
]
},
{
"Sid": "ProjectStackTemplate",
"Effect": "Allow",
"Action": [
"cloudformation:GetTemplateSummary",
"cloudformation:DescribeChangeSet"
],
"Resource": "*"
},
{
"Sid": "CloudFormationTagOnCreate",
"Effect": "Allow",
"Action": [
"cloudformation:TagResource",
"cloudformation:UntagResource"
],
"Resource": [
"arn:aws:cloudformation:*:*:stack/awscodestar-*",
"arn:aws:cloudformation:*:*:stack/awseb-*",
"arn:aws:cloudformation:*:*:stack/aws-cloud9-*",
"arn:aws:cloudformation:*:aws:transform/CodeStar*"
],
"Condition": {
"StringEquals": {
"cloudformation:CreateAction": [
"CreateStack",
"UpdateStack",
"CreateChangeSet",
"ExecuteChangeSet"
]
}
}
},
{
"Sid": "ProjectQuickstarts",
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::awscodestar-*/*"
]
},
{
"Sid": "ProjectS3Buckets",
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::aws-codestar-*",
"arn:aws:s3:::elasticbeanstalk-*"
]
},
{
"Sid": "ProjectServices",
"Effect": "Allow",
"Action": [
"codestar:*",
"codecommit:*",
"codepipeline:*",
"codedeploy:*",
"codebuild:*",
"autoscaling:*",
"cloudwatch:Put*",
"ec2:*",
"elasticbeanstalk:*",
"elasticloadbalancing:*",
"iam:ListRoles",
"logs:*",
"sns:*",
"cloud9:CreateEnvironmentEC2",
"cloud9:DeleteEnvironment",
"cloud9:DescribeEnvironment*",
"cloud9:ListEnvironments"
],
"Resource": "*"
},
{
"Sid": "ProjectWorkerRoles",
"Effect": "Allow",
"Action": [
"iam:AttachRolePolicy",
"iam:CreateRole",
"iam:DeleteRole",
"iam:DeleteRolePolicy",
"iam:DetachRolePolicy",
"iam:GetRole",
"iam:PassRole",
"iam:GetRolePolicy",
"iam:PutRolePolicy",
"iam:SetDefaultPolicyVersion",
"iam:CreatePolicy",
"iam:DeletePolicy",
"iam:AddRoleToInstanceProfile",
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:RemoveRoleFromInstanceProfile"
],
"Resource": [
"arn:aws:iam::*:role/CodeStarWorker*",
"arn:aws:iam::*:policy/CodeStarWorker*",
"arn:aws:iam::*:instance-profile/awscodestar-*"
]
},
{
"Sid": "ProjectTeamMembers",
"Effect": "Allow",
"Action": [
"iam:AttachUserPolicy",
"iam:DetachUserPolicy"
],
"Resource": "*",
"Condition": {
"ArnEquals": {
"iam:PolicyArn": [
"arn:aws:iam::*:policy/CodeStar_*"
]
}
}
},
{
"Sid": "ProjectRoles",
"Effect": "Allow",
"Action": [
"iam:CreatePolicy",
"iam:DeletePolicy",
"iam:CreatePolicyVersion",
"iam:DeletePolicyVersion",
"iam:ListEntitiesForPolicy",
"iam:ListPolicyVersions",
"iam:GetPolicy",
"iam:GetPolicyVersion"
],
"Resource": [
"arn:aws:iam::*:policy/CodeStar_*"
]
},
{
"Sid": "InspectServiceRole",
"Effect": "Allow",
"Action": [
"iam:ListAttachedRolePolicies"
],
"Resource": [
"arn:aws:iam::*:role/aws-codestar-service-role",
"arn:aws:iam::*:role/service-role/aws-codestar-service-role"
]
},
{
"Sid": "IAMLinkRole",
"Effect": "Allow",
"Action": [
"iam:CreateServiceLinkedRole"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"iam:AWSServiceName": "cloud9.amazonaws.com"
}
}
},
{
"Sid": "DescribeConfigRuleForARN",
"Effect": "Allow",
"Action": [
"config:DescribeConfigRules"
],
"Resource": [
"*"
]
},
{
"Sid": "ProjectCodeStarConnections",
"Effect": "Allow",
"Action": [
"codestar-connections:UseConnection",
"codestar-connections:GetConnection"
],
"Resource": "*"
},
{
"Sid": "ProjectCodeStarConnectionsPassConnections",
"Effect": "Allow",
"Action": "codestar-connections:PassConnection",
"Resource": "*",
"Condition": {
"StringEqualsIfExists": {
"codestar-connections:PassedToService": "codepipeline.amazonaws.com"
}
}
}
]
},
"VersionId": "v12",
"IsDefaultVersion": true,
"CreateDate": "2026-09-08T12:47:08+00:00"
}
}Version History (13 recorded)
Raw history2 actions added
AWSCodeStarServiceRole - Policy Version v11
No recorded action delta - this version predates the change index. View the raw diff.
Mar 12, 2026
51fc9edUpdate detected
No recorded action delta - this version predates the change index. View the raw diff.
Sep 18, 2024
aafbae9Update detected
No recorded action delta - this version predates the change index. View the raw diff.
May 13, 2024
1b36617Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Sep 20, 2021
0e9c4bbUpdate detected
No recorded action delta - this version predates the change index. View the raw diff.
Feb 16, 2021
23b80e6Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Sep 16, 2019
49aa1d0Update detected
No recorded action delta - this version predates the change index. View the raw diff.
Sep 16, 2019
71619cfUpdate detected
No recorded action delta - this version predates the change index. View the raw diff.
Sep 16, 2019
8279033`2019-08-29`
No recorded action delta - this version predates the change index. View the raw diff.
Aug 29, 2019
5016d52I updated my CLI and it looks like it reordered everything and changed the white-space, so everything looks changed, but is not
No recorded action delta - this version predates the change index. View the raw diff.
Jul 12, 2019
9d2dff1Update
No recorded action delta - this version predates the change index. View the raw diff.
Apr 24, 2019
bd47a01First commit
No recorded action delta - this version predates the change index. View the raw diff.
Feb 10, 2019
ad4c2e8