AWSDeepRacerServiceRolePolicy

Last Modified

Mar 12, 2026

March 12, 2026 at 09:25 PM UTC

Version

v3

Total Versions

8

Created

Jun 12, 2019

Actions

43

Risk

High

An 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 2 documented escalation paths on any resource with no condition, and 2 more in a scoped form.

    • sagemaker-004sagemaker:CreatePresignedNotebookInstanceUrlunrestricted
    • sagemaker-005sagemaker:CreateNotebookInstanceLifecycleConfig + sagemaker:StopNotebookInstance + sagemaker:UpdateNotebookInstance + sagemaker:StartNotebookInstanceunrestricted
    • lambda-003lambda:UpdateFunctionCodescoped
      • lambda:UpdateFunctionCode: on arn:aws:lambda:*:*:function:*DeepRacer*, arn:aws:lambda:*:*:function:*Deepracer*, arn:aws:lambda:*:*:function:*deepracer*
    • lambda-004lambda:UpdateFunctionCode + lambda:InvokeFunctionscoped
      • lambda:UpdateFunctionCode: on arn:aws:lambda:*:*:function:*DeepRacer*, arn:aws:lambda:*:*:function:*Deepracer*, arn:aws:lambda:*:*:function:*deepracer*
      • lambda:InvokeFunction: on arn:aws:lambda:*:*:function:*DeepRacer*, arn:aws:lambda:*:*:function:*Deepracer*, arn:aws:lambda:*:*:function:*deepracer*

    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 launch resources that run as a more privileged role

    Grants the actions of 5 documented escalation paths, but only on named resources or under a condition. Review that scope before trusting it.

    • cloudformation-001iam:PassRole + cloudformation:CreateStackscoped
      • iam:PassRole: on arn:aws:iam::*:role/AWSDeepRacer*, arn:aws:iam::*:role/service-role/AWSDeepRacer*
    • lambda-001iam:PassRole + lambda:CreateFunction + lambda:InvokeFunctionscoped
      • iam:PassRole: on arn:aws:iam::*:role/AWSDeepRacer*, arn:aws:iam::*:role/service-role/AWSDeepRacer*
      • lambda:CreateFunction: on arn:aws:lambda:*:*:function:*DeepRacer*, arn:aws:lambda:*:*:function:*Deepracer*, arn:aws:lambda:*:*:function:*deepracer*
      • lambda:InvokeFunction: on arn:aws:lambda:*:*:function:*DeepRacer*, arn:aws:lambda:*:*:function:*Deepracer*, arn:aws:lambda:*:*:function:*deepracer*
    • sagemaker-001iam:PassRole + sagemaker:CreateNotebookInstancescoped
      • iam:PassRole: on arn:aws:iam::*:role/AWSDeepRacer*, arn:aws:iam::*:role/service-role/AWSDeepRacer*
    • sagemaker-002iam:PassRole + sagemaker:CreateTrainingJobscoped
      • iam:PassRole: on arn:aws:iam::*:role/AWSDeepRacer*, arn:aws:iam::*:role/service-role/AWSDeepRacer*
    • sagemaker-003iam:PassRole + sagemaker:CreateProcessingJobscoped
      • iam:PassRole: on arn:aws:iam::*:role/AWSDeepRacer*, arn:aws:iam::*:role/service-role/AWSDeepRacer*

    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

    Full access to 3 services on every resource

    Uses deepracer:*, robomaker:*, sagemaker:* with Resource "*" and no condition, so every action AWS adds to those services later is granted too.

    deepracer:*robomaker:*sagemaker:*

    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": [
        {
          "Effect": "Allow",
          "Action": [
            "deepracer:*"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "robomaker:*",
            "sagemaker:*",
            "s3:ListAllMyBuckets"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "cloudformation:ListStackResources",
            "cloudformation:DescribeStacks",
            "cloudformation:CreateStack",
            "cloudformation:DeleteStack",
            "cloudformation:DescribeStackResource",
            "cloudformation:DescribeStackResources",
            "cloudformation:DescribeStackEvents",
            "cloudformation:DetectStackDrift",
            "cloudformation:DescribeStackDriftDetectionStatus",
            "cloudformation:DescribeStackResourceDrifts"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": "iam:CreateServiceLinkedRole",
          "Condition": {
            "StringEquals": {
              "iam:AWSServiceName": "robomaker.amazonaws.com"
            }
          },
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "iam:PassRole"
          ],
          "Resource": [
            "arn:aws:iam::*:role/AWSDeepRacer*",
            "arn:aws:iam::*:role/service-role/AWSDeepRacer*"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "cloudwatch:GetMetricData",
            "logs:CreateLogGroup",
            "logs:CreateLogStream",
            "logs:DescribeLogStreams",
            "logs:GetLogEvents",
            "logs:PutLogEvents"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "lambda:CreateFunction",
            "lambda:DeleteFunction",
            "lambda:GetFunction",
            "lambda:InvokeFunction",
            "lambda:UpdateFunctionCode"
          ],
          "Resource": [
            "arn:aws:lambda:*:*:function:*DeepRacer*",
            "arn:aws:lambda:*:*:function:*Deepracer*",
            "arn:aws:lambda:*:*:function:*deepracer*",
            "arn:aws:lambda:*:*:function:*dr-*"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:GetObject",
            "s3:GetBucketLocation",
            "s3:DeleteObject",
            "s3:ListBucket",
            "s3:PutObject",
            "s3:PutBucketPolicy",
            "s3:GetBucketAcl"
          ],
          "Resource": [
            "arn:aws:s3:::*DeepRacer*",
            "arn:aws:s3:::*Deepracer*",
            "arn:aws:s3:::*deepracer*",
            "arn:aws:s3:::dr-*"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:GetObject"
          ],
          "Resource": "*",
          "Condition": {
            "StringEqualsIgnoreCase": {
              "s3:ExistingObjectTag/DeepRacer": "true"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "kinesisvideo:CreateStream",
            "kinesisvideo:DeleteStream",
            "kinesisvideo:DescribeStream",
            "kinesisvideo:GetDataEndpoint",
            "kinesisvideo:GetHLSStreamingSessionURL",
            "kinesisvideo:GetMedia",
            "kinesisvideo:PutMedia",
            "kinesisvideo:TagStream"
          ],
          "Resource": [
            "arn:aws:kinesisvideo:*:*:stream/dr-*"
          ]
        }
      ]
    },
    "VersionId": "v3",
    "IsDefaultVersion": true,
    "CreateDate": "2019-06-12T20:55:34+00:00"
  }
}

Version History (11 recorded)

Raw history

AWSDeepRacerServiceRolePolicy - Policy Version v3

No recorded action delta - this version predates the change index. View the raw diff.

Mar 12, 2026

6ab9f88

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

Sep 18, 2024

aafbae9

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

May 13, 2024

1b36617

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

Sep 16, 2019

49aa1d0

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

Sep 16, 2019

71619cf

Update 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

5016d52

I 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

9d2dff1

Update

No recorded action delta - this version predates the change index. View the raw diff.

Jun 12, 2019

6876c26

Update 2019.04.08

No recorded action delta - this version predates the change index. View the raw diff.

Apr 8, 2019

af3d050

Update 2019.03.03

No recorded action delta - this version predates the change index. View the raw diff.

Mar 3, 2019

6655c5d