creating-ec2-image-builder-pipeline

Creates an EC2 Image Builder pipeline that builds and distributes custom AMIs across regions.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill creating-ec2-image-builder-pipeline-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creating-ec2-image-builder-pipeline
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/creating-ec2-image-builder-pipeline
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill creating-ec2-image-builder-pipeline-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Manually building and distributing custom AMIs with pre-installed software is error-prone and repetitive. This Skill automates the entire EC2 Image Builder pipeline lifecycle, from IAM role setup through pipeline execution and launch template creation. ## Core Features & Use Cases - End-to-End Pipeline Creation: Sets up IAM roles, build components, image recipes, infrastructure and distribution configurations, and the image pipeline itself. - Cross-Region AMI Distribution: Configures distribution of the built AMI to a target region and starts the build execution. - Launch Template Provisioning: Creates an EC2 launch template ready to use the custom AMI once the build completes. - Use Case: A platform engineer needs a standardized AMI with AWS CLI v2 pre-installed, distributed from us-east-1 to us-east-2. This Skill creates all resources, starts the build, and provides commands to track status and launch instances. ## Quick Start Ask the assistant to create an EC2 Image Builder pipeline in us-east-1 that builds a custom AMI with AWS CLI v2 and distributes it to us-east-2.

Frequently Asked Questions about creating-ec2-image-builder-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an EC2 Image Builder pipeline with AWS CLI?

Create the resources in order: IAM role and instance profile, build component, image recipe, infrastructure configuration, distribution configuration, then the image pipeline. Use the exact ARNs returned by each create API call when assembling the pipeline.

How do I distribute a custom AMI to another AWS region?

Create a distribution configuration with distribution entries for both the source region and the target region, each with an amiDistributionConfiguration. If the target region matches the source region, include only a single entry to avoid duplicate region errors.

Why does create-image-pipeline fail with InvalidParameterValueException?

This error is caused by malformed ARNs passed to the API. Use the exact ARN returned by each create call rather than constructing ARNs manually, and do not add version or build number segments to pipeline ARNs.

Why does the build fail with InstanceProfileNotFoundException?

IAM changes are eventually consistent, so the instance profile may not be visible immediately after creation. Wait 10-15 seconds after creating the instance profile before referencing it in the infrastructure configuration.

How long does an EC2 Image Builder build take?

Image builds typically take 15-45 minutes and continue running in the background after execution starts. Check progress with aws imagebuilder get-image using the image build version ARN returned when the pipeline execution started.

Can the pipeline build container images and push to ECR?

Yes, set the enable_ecr_builds parameter to true. This attaches the EC2InstanceProfileForImageBuilderECRContainerBuilds managed policy to the IAM role, granting the build instance the required ECR access.