Custom Build and Test Components developed for AWS EC2 Image Builder (https://docs.aws.amazon.com/imagebuilder/latest/userguide/what-is-image-builder.html)
- Create a S3 bucket (configuration-bucket) and place files in
S3
folder of component. - Create IAM Role and attach following required policies:
- arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
- arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilder
- Replace
<bucket-name>
with your newly created bucket name (configuration-bucket) in yaml component file - Create EC2 Image Builder pipeline with Amazon Linux 2
- Create Components that you want to use by coping yaml component file
- Select IAM Role that you have created on Step 2
- Name your pipeline
- Name your AMI
- Trigger pipeline
- You can disable
Terminate instance on failure
option and select a keypair while creating a pipeline to connect and troubleshoot any errors on the build instance. - You can follow and check AWS Systems Manager logs from, https://eu-west-1.console.aws.amazon.com/systems-manager/automation/executions
These components are tested on Amazon-linux-2-x86/2019.11.21