Skip to main content
IAM Policy Map

EC2InstanceProfileForImageBuilderECRContainerBuilds

OperatorAWS managedActivePermissions reviewedShow on mapCompare

Summary

EC2 Instance profile for building container images with EC2 Image Builder. This policy grants the user broad permissions to upload ECR images.

Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.

Identity

ARN
arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilderECRContainerBuilds
Default version
v1
Created
Last edited
Services
ecr, imagebuilder, kms, logs, s3

Control-plane actions (14)

By access level: 6 Read, 8 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
Elastic Container Registry8 of 654 Read, 4 Write; 0 restricted, 0 conditionalecr:BatchCheckLayerAvailability, ecr:BatchGetImage, ecr:CompleteLayerUpload, ecr:GetAuthorizationToken, ecr:GetDownloadUrlForLayer, ecr:InitiateLayerUpload, ecr:PutImage, ecr:UploadLayerPart
EC2 Image Builder2 of 772 Read; 0 restricted, 0 conditionalimagebuilder:GetComponent, imagebuilder:GetContainerRecipe
KMS1 of 581 Write; 1 restricted, 1 conditionalkms:Decrypt
CloudWatch Logs3 of 1333 Write; 3 restricted, 0 conditionallogs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEvents
Elastic Container Registry: 8 actions
  • ecr:BatchCheckLayerAvailability (Read)
  • ecr:BatchGetImage (Read)
  • ecr:CompleteLayerUpload (Write)
  • ecr:GetAuthorizationToken (Read)
  • ecr:GetDownloadUrlForLayer (Read)
  • ecr:InitiateLayerUpload (Write)
  • ecr:PutImage (Write)
  • ecr:UploadLayerPart (Write)
EC2 Image Builder: 2 actions
  • imagebuilder:GetComponent (Read)
  • imagebuilder:GetContainerRecipe (Read)
KMS: 1 actions
  • kms:Decrypt (Write)
CloudWatch Logs: 3 actions
  • logs:CreateLogGroup (Write)
  • logs:CreateLogStream (Write)
  • logs:PutLogEvents (Write)

Data-plane actions (1)

By access level: 1 Read.

Data-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
S31 of 251 Read; 1 restricted, 0 conditionals3:GetObject
S3: 1 actions
  • s3:GetObject (Read)

Excluded and conditional actions

No patterns are excluded by NotAction or Deny statements.

Resource scope and attachment

Resource scope across granted actions: mixed.

Can be attached: Yes, to users, groups and roles.

Why this tier

  • Grants 8 write, tagging or permissions-management actions, short of full control of any service.

Guidance

Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.

Same service

Same domain

Frequently asked questions

Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.

Policy JSON

Download policy.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "imagebuilder:GetComponent",
        "imagebuilder:GetContainerRecipe",
        "ecr:GetAuthorizationToken",
        "ecr:BatchGetImage",
        "ecr:InitiateLayerUpload",
        "ecr:UploadLayerPart",
        "ecr:CompleteLayerUpload",
        "ecr:BatchCheckLayerAvailability",
        "ecr:GetDownloadUrlForLayer",
        "ecr:PutImage"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "kms:Decrypt"
      ],
      "Resource": "*",
      "Condition": {
        "ForAnyValue:StringEquals": {
          "kms:EncryptionContextKeys": "aws:imagebuilder:arn",
          "aws:CalledVia": [
            "imagebuilder.amazonaws.com"
          ]
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": "arn:aws:s3:::ec2imagebuilder*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogStream",
        "logs:CreateLogGroup",
        "logs:PutLogEvents"
      ],
      "Resource": "arn:aws:logs:*:*:log-group:/aws/imagebuilder/*"
    }
  ]
}

Version history

Current version v1, edited by AWS on 2020-12-11. Version history is recorded from 2026-11-11. Earlier versions are in the IAM console under Policy versions.

Attach snippets

AWS CLI

aws iam attach-role-policy --role-name ROLE_NAME --policy-arn arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilderECRContainerBuilds
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilderECRContainerBuilds
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilderECRContainerBuilds

CloudFormation

Resources:
  ExampleRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument: {}  # replace with your trust policy
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilderECRContainerBuilds

Terraform

resource "aws_iam_role_policy_attachment" "ec2instanceprofileforimagebuilderecrcontainerbuilds" {
  role       = aws_iam_role.example.name
  policy_arn = "arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilderECRContainerBuilds"
}

CDK (TypeScript)

role.addManagedPolicy(
  iam.ManagedPolicy.fromAwsManagedPolicyName("EC2InstanceProfileForImageBuilderECRContainerBuilds"),
);

Sources

Pending editorial review. No editorial sources are listed yet.