Skip to content

EC2 Image Builder Integration Fails with "ec2:CreateVpc" Permission Error for Windows Server 2022 Core AMI

0

I’m building a custom Windows Server 2022 Core AMI using EC2 Image Builder. All the build and test steps complete successfully, and the image is shared with another AWS account as expected. However, the integration step fails with the following error:

Integration failed with JobId '22021ace-72c3-4010-a66e-966037038c34', status = 'Failed' for ARN 'arn:aws:imagebuilder:eu-west-1:123456789:image/eks-1-33-node-windows-2022-core/1.33.0/18'.

Error: In region 'eu-west-1' - 'EC2 Client Error: Can't enable EC2 Fast Launch. The IAM credentials that you are using do not have sufficient permissions. Attach EC2FastLaunchFullAccess in the IAM console.

You are not authorized to perform this operation. User: arn:aws:sts::123456789:assumed-role/AWSServiceRoleForImageBuilder/Ec2ImageBuilderIntegrationService is not authorized to perform: ec2:CreateVpc on resource: arn:aws:ec2:eu-west-1:123456789:vpc/* because no identity-based policy allows the ec2:CreateVpc action.

I’ve confirmed that the image was built and shared but giving error in image builder console . How can solve this ?

1 Answer
0

This error occurs because EC2 Image Builder is attempting to enable EC2 Fast Launch for your Windows Server 2022 Core AMI, but the service role being used (AWSServiceRoleForImageBuilder) lacks the necessary permissions to create VPC resources required for this feature.

To resolve this issue, you need to update the IAM permissions for the service role that EC2 Image Builder is using. Specifically, you need to add the ec2:CreateVpc permission to the role's policy.

Here's how to fix it:

  1. Navigate to the IAM console
  2. Find the role mentioned in the error message (AWSServiceRoleForImageBuilder)
  3. Update the policy by adding a new statement that grants the ec2:CreateVpc permission on the required resource
  4. Save the changes and attempt the integration again

Alternatively, if you don't have permissions to update this service role (as it's an AWS-managed role), you may need to:

  • Escalate to someone with appropriate permissions to make these changes
  • Check if there are any Service Control Policies (SCPs) in your AWS Organization that might be restricting these actions
  • Consider attaching the EC2FastLaunchFullAccess policy as mentioned in the error message

Once the appropriate permissions are in place, the EC2 Image Builder should be able to complete the integration step successfully, enabling EC2 Fast Launch for your Windows Server 2022 Core AMI.
Sources
How do I troubleshoot when User: arn is no authorized to perform Create * or Delete * or Update * on resource(s) because no identity- policy allows the actions | AWS re:Post
Welcome - EC2 Image Builder
Amazon EC2 Image Builder Features - AWS

answered a year ago

  • My user has admin access but im not able to append the service role (AWSServiceRoleForImageBuilder)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.