All Products
Search
Document Center

Resource Access Management:AliyunServiceRolePolicyForECSImageBuilder

Last Updated:Jun 09, 2026

AliyunServiceRolePolicyForECSImageBuilder is the authorization policy dedicated to a service-linked role. The policy is automatically attached to a service role when the service role is created. Then, the service-linked role is authorized to access other cloud services. This policy is updated by the relevant Alibaba Cloud service. Do not attach this policy to a RAM identity other than a service-linked role.

Policy details

  • Type: service system policy

  • Creation time: 10:58:14 on September 17, 2025

  • Update time: 14:22:04 on June 09, 2026

  • Current version: v12

Policy content

{
  "Version": "1",
  "Statement": [
    {
      "Action": [
        "oss:PutObject",
        "oss:GetObject"
      ],
      "Effect": "Allow",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "oss:BucketTag/allowImageBuilderAccess": "true"
        }
      }
    },
    {
      "Action": [
        "oos:CreateTemplate",
        "oos:StartExecution",
        "oos:CancelExecution",
        "oos:ListExecutions",
        "oos:ListTaskExecutions",
        "oos:ListExecutionLogs",
        "oos:DeleteTemplate",
        "oos:ValidateTemplateContent",
        "oos:DeleteExecutions"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Action": [
        "ecs:DescribeAvailableResource",
        "ecs:DescribeInstances",
        "ecs:DescribeCloudAssistantStatus",
        "ecs:DescribeImages",
        "ecs:DescribeImageFromFamily",
        "ecs:DescribeInvocations",
        "ecs:DescribeInvocationResults",
        "ecs:DescribeSecurityGroups",
        "ecs:CancelCopyImage",
        "ecs:ModifyImageSharePermission",
        "ecs:CreateInstance",
        "ecs:RunInstances",
        "ecs:CopyImage",
        "ecs:DeleteSnapshot",
        "ecs:DescribeImageSupportInstanceTypes",
        "ecs:DescribeDisks",
        "ecs:CreateSecurityGroup",
        "ecs:CancelTask",
        "ecs:DescribeTaskAttribute",
        "ecs:DescribeSnapshots"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Action": [
        "ecs:RebootInstance",
        "ecs:DeleteImage",
        "ecs:DescribeImageSharePermission",
        "ecs:InstallCloudAssistant",
        "ecs:CreateImage",
        "ecs:StartInstance",
        "ecs:StopInstance",
        "ecs:DeleteInstance",
        "ecs:AllocatePublicIpAddress",
        "ecs:RunCommand",
        "ecs:DeleteSecurityGroup",
        "ecs:ModifyImageAttribute",
        "ecs:DeleteDisk",
        "ecs:ImportImage",
        "ecs:ModifyInstanceAttribute",
        "ecs:CreateSnapshot"
      ],
      "Effect": "Allow",
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "ecs:tag/imagepipelineid": "*"
        }
      }
    },
    {
      "Action": [
        "ecs:AttachDisk",
        "ecs:DetachDisk"
      ],
      "Effect": "Allow",
      "Resource": "acs:ecs:*:*:disk/*"
    },
    {
      "Action": [
        "ecs:AttachDisk",
        "ecs:DetachDisk"
      ],
      "Effect": "Allow",
      "Resource": "acs:ecs:*:*:instance/*",
      "Condition": {
        "StringLike": {
          "ecs:tag/imagepipelineid": "*"
        }
      }
    },
    {
      "Action": "ecs:InvokeCommand",
      "Effect": "Allow",
      "Resource": "acs:ecs:*:*:instance/*",
      "Condition": {
        "StringLike": {
          "ecs:tag/imagepipelineid": "*"
        }
      }
    },
    {
      "Action": "ecs:InvokeCommand",
      "Effect": "Allow",
      "Resource": "acs:ecs:*:*:command/*"
    },
    {
      "Action": [
        "vpc:DescribeVSwitches",
        "vpc:DescribeVpcs",
        "vpc:CreateVpc",
        "vpc:CreateVSwitch",
        "vpc:DeleteVSwitch",
        "vpc:DeleteVpc"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Action": "ram:DeleteServiceLinkedRole",
      "Effect": "Allow",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "ram:ServiceName": "imagebuilder.ecs.aliyuncs.com"
        }
      }
    },
    {
      "Action": "ram:CreateServiceLinkedRole",
      "Resource": "*",
      "Effect": "Allow",
      "Condition": {
        "StringEquals": {
          "ram:ServiceName": "systemeventoperator.oos.aliyuncs.com"
        }
      }
    }
  ]
}

References