EC2ImageBuilderExecutionPolicy
Summary
Grants permissions that allow EC2 Image Builder to call AWS services on your behalf
Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.
Identity
- ARN
arn:aws:iam::aws:policy/EC2ImageBuilderExecutionPolicy- Default version
- v3
- Created
- Last edited
- Services
- ec2, ecr, events, iam, imagebuilder, inspector2, kms, license-manager, logs, sns, ssm, sts
Control-plane actions (72)
By access level: 19 List, 2 Permissions management, 8 Read, 4 Tagging, 39 Write.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| EC2 | 31 of 834 | 14 List, 1 Permissions management, 1 Tagging, 15 Write; 14 restricted, 11 conditional | ec2:AttachImageWatermark, ec2:CancelExportTask, ec2:CopyImage, ec2:CreateImage, ec2:CreateLaunchTemplateVersion, ec2:CreateTags, ec2:DeregisterImage, ec2:DescribeExportImageTasks, ec2:DescribeHosts, ec2:DescribeImages, ec2:DescribeImportImageTasks, ec2:DescribeInstanceAttribute and 19 more |
| Elastic Container Registry | 3 of 65 | 1 Tagging, 2 Write; 3 restricted, 3 conditional | ecr:BatchDeleteImage, ecr:CreateRepository, ecr:TagResource |
| EventBridge | 5 of 71 | 1 Read, 4 Write; 5 restricted, 0 conditional | events:DeleteRule, events:DescribeRule, events:PutRule, events:PutTargets, events:RemoveTargets |
| IAM | 2 of 190 | 2 Write; 2 restricted, 2 conditional | iam:CreateServiceLinkedRole, iam:PassRole |
| EC2 Image Builder | 2 of 77 | 1 Tagging, 1 Write; 2 restricted, 2 conditional | imagebuilder:StartImagePipelineExecution, imagebuilder:TagResource |
| Inspector2 | 5 of 84 | 3 List, 1 Read, 1 Write; 3 restricted, 0 conditional | inspector2:GetOnDemandScanStatus, inspector2:ListCoverage, inspector2:ListFindings, inspector2:ListOnDemandScans, inspector2:StartOnDemandScan |
| KMS | 7 of 58 | 1 Permissions management, 1 Read, 5 Write; 7 restricted, 7 conditional | kms:CreateGrant, kms:Decrypt, kms:DescribeKey, kms:Encrypt, kms:GenerateDataKeyWithoutPlaintext, kms:ReEncryptFrom, kms:ReEncryptTo |
| License Manager | 1 of 62 | 1 Write; 1 restricted, 0 conditional | license-manager:UpdateLicenseSpecificationsForResource |
| CloudWatch Logs | 3 of 133 | 3 Write; 3 restricted, 0 conditional | logs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEvents |
| Systems Manager | 12 of 164 | 2 List, 5 Read, 1 Tagging, 4 Write; 8 restricted, 1 conditional | ssm:AddTagsToResource, ssm:CreateAssociation, ssm:DeleteAssociation, ssm:DescribeAssociationExecutions, ssm:DescribeInstanceAssociationsStatus, ssm:DescribeInstanceInformation, ssm:GetCommandInvocation, ssm:GetParameter, ssm:ListCommandInvocations, ssm:ListInventoryEntries, ssm:PutParameter, ssm:SendCommand |
| STS | 1 of 16 | 1 Write; 1 restricted, 0 conditional | sts:AssumeRole |
EC2: 31 actions
- ec2:AttachImageWatermark (Write)
- ec2:CancelExportTask (Write)
- ec2:CopyImage (Write)
- ec2:CreateImage (Write)
- ec2:CreateLaunchTemplateVersion (Write)
- ec2:CreateTags (Tagging)
- ec2:DeregisterImage (Write)
- ec2:DescribeExportImageTasks (List)
- ec2:DescribeHosts (List)
- ec2:DescribeImages (List)
- ec2:DescribeImportImageTasks (List)
- ec2:DescribeInstanceAttribute (List)
- ec2:DescribeInstanceStatus (List)
- ec2:DescribeInstanceTypeOfferings (List)
- ec2:DescribeInstanceTypes (List)
- ec2:DescribeInstances (List)
- ec2:DescribeLaunchTemplateVersions (List)
- ec2:DescribeLaunchTemplates (List)
- ec2:DescribeSnapshots (List)
- ec2:DescribeSubnets (List)
- ec2:DescribeTags (List)
- ec2:EnableFastLaunch (Write)
- ec2:ExportImage (Write)
- ec2:ModifyImageAttribute (Write)
- ec2:ModifyLaunchTemplate (Write)
- ec2:ModifySnapshotAttribute (Permissions management)
- ec2:RegisterImage (Write)
- ec2:RunInstances (Write)
- ec2:StartInstances (Write)
- ec2:StopInstances (Write)
- ec2:TerminateInstances (Write)
Elastic Container Registry: 3 actions
- ecr:BatchDeleteImage (Write)
- ecr:CreateRepository (Write)
- ecr:TagResource (Tagging)
EventBridge: 5 actions
- events:DeleteRule (Write)
- events:DescribeRule (Read)
- events:PutRule (Write)
- events:PutTargets (Write)
- events:RemoveTargets (Write)
IAM: 2 actions
- iam:CreateServiceLinkedRole (Write)
- iam:PassRole (Write)
EC2 Image Builder: 2 actions
- imagebuilder:StartImagePipelineExecution (Write)
- imagebuilder:TagResource (Tagging)
Inspector2: 5 actions
- inspector2:GetOnDemandScanStatus (Read)
- inspector2:ListCoverage (List)
- inspector2:ListFindings (List)
- inspector2:ListOnDemandScans (List)
- inspector2:StartOnDemandScan (Write)
KMS: 7 actions
- kms:CreateGrant (Permissions management)
- kms:Decrypt (Write)
- kms:DescribeKey (Read)
- kms:Encrypt (Write)
- kms:GenerateDataKeyWithoutPlaintext (Write)
- kms:ReEncryptFrom (Write)
- kms:ReEncryptTo (Write)
License Manager: 1 actions
- license-manager:UpdateLicenseSpecificationsForResource (Write)
CloudWatch Logs: 3 actions
- logs:CreateLogGroup (Write)
- logs:CreateLogStream (Write)
- logs:PutLogEvents (Write)
Systems Manager: 12 actions
- ssm:AddTagsToResource (Tagging)
- ssm:CreateAssociation (Write)
- ssm:DeleteAssociation (Write)
- ssm:DescribeAssociationExecutions (Read)
- ssm:DescribeInstanceAssociationsStatus (Read)
- ssm:DescribeInstanceInformation (Read)
- ssm:GetCommandInvocation (Read)
- ssm:GetParameter (Read)
- ssm:ListCommandInvocations (List)
- ssm:ListInventoryEntries (List)
- ssm:PutParameter (Write)
- ssm:SendCommand (Write)
STS: 1 actions
- sts:AssumeRole (Write)
Data-plane actions (1)
By access level: 1 Write.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| SNS | All 1 actions (see the SNS page) | 1 Write; 1 restricted, 1 conditional | sns:Publish |
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 46 write, tagging or permissions-management actions, short of full control of any service.
- Grants iam:PassRole, but only for scoped roles or under conditions (for example iam:PassedToService).
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.
Related policies
Same service
- AdministratorAccess-AWSElasticBeanstalk
- AIDevOpsReleaseManagementVPCPolicy
- AIOpsOperatorAccess
- AmazonAppStreamServiceAccess
- AmazonBioDiscoveryServiceLinkedRolePolicy
- AmazonDataZoneEnvironmentRolePermissionsBoundary
- AmazonDataZoneProjectDeploymentPermissionsBoundary
- AmazonDataZoneProjectRolePermissionsBoundary
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
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RunInstancesPermissions",
"Effect": "Allow",
"Action": [
"ec2:RunInstances"
],
"Resource": [
"arn:aws:ec2:*::image/*",
"arn:aws:ec2:*::snapshot/*",
"arn:aws:ec2:*:*:key-pair/*",
"arn:aws:ec2:*:*:launch-template/*",
"arn:aws:ec2:*:*:network-interface/*",
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:subnet/*",
"arn:aws:license-manager:*:*:license-configuration:*"
]
},
{
"Sid": "RunInstancesWithEC2ImageBuilderRequestTagsPermissions",
"Effect": "Allow",
"Action": [
"ec2:RunInstances"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:volume/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/CreatedBy": [
"EC2 Image Builder",
"EC2 Fast Launch"
]
}
}
},
{
"Sid": "IAMPassRolePermissions",
"Effect": "Allow",
"Action": [
"iam:PassRole"
],
"Resource": [
"arn:aws:iam::*:role/*"
],
"Condition": {
"StringEquals": {
"iam:PassedToService": [
"ec2.amazonaws.com",
"ec2.amazonaws.com.cn",
"vmie.amazonaws.com"
]
}
}
},
{
"Sid": "EC2InstanceStateChangePermissions",
"Effect": "Allow",
"Action": [
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EC2ReadOnlyPermissions",
"Effect": "Allow",
"Action": [
"ec2:DescribeExportImageTasks",
"ec2:DescribeHosts",
"ec2:DescribeImages",
"ec2:DescribeImportImageTasks",
"ec2:DescribeInstanceAttribute",
"ec2:DescribeInstances",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInstanceTypeOfferings",
"ec2:DescribeSnapshots",
"ec2:DescribeSubnets",
"ec2:DescribeTags"
],
"Resource": "*"
},
{
"Sid": "EC2CopyPermissions",
"Effect": "Allow",
"Action": [
"ec2:CopyImage"
],
"Resource": "*"
},
{
"Sid": "EC2CreateImagePermissionsForImage",
"Effect": "Allow",
"Action": [
"ec2:CreateImage"
],
"Resource": [
"arn:aws:ec2:*::image/*",
"arn:aws:ec2:*::snapshot/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EC2CreateImagePermissionsForInstance",
"Effect": "Allow",
"Action": [
"ec2:CreateImage"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EC2DeregisterImagePermissions",
"Effect": "Allow",
"Action": [
"ec2:DeregisterImage"
],
"Resource": [
"arn:aws:ec2:*::image/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EC2RegisterImagePermissionsForImage",
"Effect": "Allow",
"Action": [
"ec2:RegisterImage"
],
"Resource": [
"arn:aws:ec2:*::image/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EC2RegisterImagePermissionsForSnapshot",
"Effect": "Allow",
"Action": [
"ec2:RegisterImage"
],
"Resource": [
"arn:aws:ec2:*::snapshot/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EC2ModifyImageAttributePermissions",
"Effect": "Allow",
"Action": [
"ec2:ModifyImageAttribute"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EC2SnapshotAttributeModificationPermissions",
"Effect": "Allow",
"Action": [
"ec2:ModifySnapshotAttribute"
],
"Resource": [
"arn:aws:ec2:*::snapshot/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "CreateTagsOnCreatePermissions",
"Effect": "Allow",
"Action": [
"ec2:CreateTags"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:RequestTag/CreatedBy": [
"EC2 Image Builder",
"EC2 Fast Launch"
],
"ec2:CreateAction": [
"CreateImage",
"RunInstances"
]
}
}
},
{
"Sid": "CreateCustomerTagsPermissions",
"Effect": "Allow",
"Action": [
"ec2:CreateTags"
],
"Resource": [
"arn:aws:ec2:*::image/*",
"arn:aws:ec2:*:*:export-image-task/*"
]
},
{
"Sid": "CreateEC2ImageBuilderTagsPermissions",
"Effect": "Allow",
"Action": [
"ec2:CreateTags"
],
"Resource": [
"arn:aws:ec2:*::snapshot/*",
"arn:aws:ec2:*:*:launch-template/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/CreatedBy": [
"EC2 Image Builder",
"EC2 Fast Launch"
]
}
}
},
{
"Sid": "AttachImageWatermarkPermissions",
"Effect": "Allow",
"Action": [
"ec2:AttachImageWatermark"
],
"Resource": [
"arn:aws:ec2:*::image/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "UpdateCustomerLicensePermissions",
"Effect": "Allow",
"Action": [
"license-manager:UpdateLicenseSpecificationsForResource"
],
"Resource": [
"arn:aws:license-manager:*:*:license-configuration:*"
]
},
{
"Sid": "PublishNotificationToCustomerSNSPermissions",
"Effect": "Allow",
"Action": [
"sns:Publish"
],
"Resource": [
"arn:aws:sns:*:*:*"
],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
},
{
"Sid": "SystemsManagerPermissions",
"Effect": "Allow",
"Action": [
"ssm:DescribeInstanceInformation",
"ssm:GetCommandInvocation",
"ssm:ListCommandInvocations",
"ssm:ListInventoryEntries"
],
"Resource": "*"
},
{
"Sid": "SystemsManagerPermissionsForAssociation",
"Effect": "Allow",
"Action": [
"ssm:DescribeAssociationExecutions"
],
"Resource": [
"arn:aws:ssm:*:*:association/*"
]
},
{
"Sid": "SystemsManagerPermissionsForInstance",
"Effect": "Allow",
"Action": [
"ssm:DescribeInstanceAssociationsStatus"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
]
},
{
"Sid": "SendCommandDocumentPermissions",
"Effect": "Allow",
"Action": [
"ssm:SendCommand"
],
"Resource": [
"arn:aws:ssm:*:*:document/AWS-RunPowerShellScript",
"arn:aws:ssm:*:*:document/AWS-RunShellScript",
"arn:aws:ssm:*:*:document/AWSEC2-RunSysprep"
]
},
{
"Sid": "SendCommandEC2ImageBuilderInstancePermissions",
"Effect": "Allow",
"Action": [
"ssm:SendCommand"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "InventoryCollectionAssociationPermissions",
"Effect": "Allow",
"Action": [
"ssm:CreateAssociation"
],
"Resource": [
"arn:aws:ssm:*:*:association/*",
"arn:aws:ssm:*:*:document/AWS-GatherSoftwareInventory"
]
},
{
"Sid": "InventoryCollectionInstancePermissions",
"Effect": "Allow",
"Action": [
"ssm:CreateAssociation"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "InventoryCollectionTagPermissions",
"Effect": "Allow",
"Action": [
"ssm:AddTagsToResource"
],
"Resource": [
"arn:aws:ssm:*:*:association/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "DeleteInventoryCollectionAssociationPermissions",
"Effect": "Allow",
"Action": [
"ssm:DeleteAssociation"
],
"Resource": [
"arn:aws:ssm:*:*:association/*"
]
},
{
"Sid": "EC2KMSPermissions",
"Effect": "Allow",
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:ReEncryptFrom",
"kms:ReEncryptTo",
"kms:GenerateDataKeyWithoutPlaintext"
],
"Resource": [
"arn:aws:kms:*:*:key/*"
],
"Condition": {
"ForAllValues:StringEquals": {
"kms:EncryptionContextKeys": [
"aws:ebs:id"
]
},
"StringLike": {
"kms:ViaService": [
"ec2.*.amazonaws.com"
]
}
}
},
{
"Sid": "EC2KMSDescribeKeyPermissions",
"Effect": "Allow",
"Action": [
"kms:DescribeKey"
],
"Resource": [
"arn:aws:kms:*:*:key/*"
],
"Condition": {
"StringLike": {
"kms:ViaService": [
"ec2.*.amazonaws.com"
]
}
}
},
{
"Sid": "EC2KMSGrantKeyPermissions",
"Effect": "Allow",
"Action": [
"kms:CreateGrant"
],
"Resource": [
"arn:aws:kms:*:*:key/*"
],
"Condition": {
"Bool": {
"kms:GrantIsForAWSResource": true
},
"StringLike": {
"kms:ViaService": [
"ec2.*.amazonaws.com"
]
}
}
},
{
"Sid": "CrossAccountAssumeRolePermissions",
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Resource": [
"arn:aws:iam::*:role/EC2ImageBuilderDistributionCrossAccountRole"
]
},
{
"Sid": "CloudWatchLogsPermissions",
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:*:*:log-group:/aws/imagebuilder/*"
]
},
{
"Sid": "LaunchTemplatePermissions",
"Effect": "Allow",
"Action": [
"ec2:CreateLaunchTemplateVersion",
"ec2:DescribeLaunchTemplateVersions",
"ec2:DescribeLaunchTemplates",
"ec2:ModifyLaunchTemplate"
],
"Resource": "*"
},
{
"Sid": "ExportImageBuilderImagePermissions",
"Effect": "Allow",
"Action": [
"ec2:ExportImage"
],
"Resource": [
"arn:aws:ec2:*::image/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "CreateExportImageTaskPermissions",
"Effect": "Allow",
"Action": [
"ec2:ExportImage"
],
"Resource": [
"arn:aws:ec2:*:*:export-image-task/*"
]
},
{
"Sid": "CancelExportImageTaskPermissions",
"Effect": "Allow",
"Action": [
"ec2:CancelExportTask"
],
"Resource": [
"arn:aws:ec2:*:*:export-image-task/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "CreateSLRForOtherServicesPermissions",
"Effect": "Allow",
"Action": [
"iam:CreateServiceLinkedRole"
],
"Resource": [
"arn:aws:iam::*:role/*"
],
"Condition": {
"StringEquals": {
"iam:AWSServiceName": [
"agentless.inspector2.amazonaws.com",
"ami.inspector2.amazonaws.com",
"ec2fastlaunch.amazonaws.com",
"inspector2.amazonaws.com",
"ssm.amazonaws.com"
]
}
}
},
{
"Sid": "EnableFastLaunchPermissions",
"Effect": "Allow",
"Action": [
"ec2:EnableFastLaunch"
],
"Resource": [
"arn:aws:ec2:*::image/*",
"arn:aws:ec2:*:*:launch-template/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "ListInspectorFindingsPermissions",
"Effect": "Allow",
"Action": [
"inspector2:ListCoverage",
"inspector2:ListFindings"
],
"Resource": "*"
},
{
"Sid": "InspectorOnDemandScanningPermissions",
"Effect": "Allow",
"Action": [
"inspector2:StartOnDemandScan",
"inspector2:GetOnDemandScanStatus",
"inspector2:ListOnDemandScans"
],
"Resource": [
"arn:aws:inspector2:*:*:*"
]
},
{
"Sid": "CreateECRImageForInspectorScanningPermissions",
"Effect": "Allow",
"Action": [
"ecr:CreateRepository",
"ecr:TagResource"
],
"Resource": [
"arn:aws:ecr:*:*:repository/image-builder-*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "DeleteECRImageForInspectorScanningPermissions",
"Effect": "Allow",
"Action": [
"ecr:BatchDeleteImage"
],
"Resource": [
"arn:aws:ecr:*:*:repository/image-builder-*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/CreatedBy": "EC2 Image Builder"
}
}
},
{
"Sid": "EventBridgePermissionsForInspectorScanning",
"Effect": "Allow",
"Action": [
"events:DeleteRule",
"events:DescribeRule",
"events:PutRule",
"events:PutTargets",
"events:RemoveTargets"
],
"Resource": [
"arn:aws:events:*:*:rule/ImageBuilder-*"
]
},
{
"Sid": "ParameterStorePermissionsForImageBuilderParameters",
"Effect": "Allow",
"Action": [
"ssm:GetParameter",
"ssm:PutParameter"
],
"Resource": [
"arn:aws:ssm:*:*:parameter/imagebuilder/*"
]
},
{
"Sid": "ParameterStorePermissionsForServiceManagedParameters",
"Effect": "Allow",
"Action": [
"ssm:GetParameter"
],
"Resource": [
"arn:aws:ssm:*::parameter/aws/service/*"
]
},
{
"Sid": "StartImagePipelineExecutionPermissions",
"Effect": "Allow",
"Action": [
"imagebuilder:StartImagePipelineExecution",
"imagebuilder:TagResource"
],
"Resource": [
"arn:aws:imagebuilder:*:*:image-pipeline/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "${aws:PrincipalAccount}"
}
}
}
]
}
Version history
Current version v3, edited by AWS on 2026-10-27. 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/EC2ImageBuilderExecutionPolicy
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/EC2ImageBuilderExecutionPolicy
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/EC2ImageBuilderExecutionPolicyCloudFormation
Resources:
ExampleRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument: {} # replace with your trust policy
ManagedPolicyArns:
- arn:aws:iam::aws:policy/EC2ImageBuilderExecutionPolicyTerraform
resource "aws_iam_role_policy_attachment" "ec2imagebuilderexecutionpolicy" {
role = aws_iam_role.example.name
policy_arn = "arn:aws:iam::aws:policy/EC2ImageBuilderExecutionPolicy"
}CDK (TypeScript)
role.addManagedPolicy(
iam.ManagedPolicy.fromAwsManagedPolicyName("EC2ImageBuilderExecutionPolicy"),
);Sources
Pending editorial review. No editorial sources are listed yet.