Skip to content

image-builder

Create an Amazon Machine Image (AMI) using EC2 Image Builder and AWS CLI

All the scripts in this article are bash scripts

Setup for macOS

Make sure you do this setup first:

  1. Setup macOS for AWS Cloud DevOps
  2. AWS Authentication

Set variables

Set variables needed for next steps:

account_id=$(aws sts get-caller-identity --query Account --output text)

# change this to your desired region
region="us-west-2"  

# EC2 Image Builder Instance Role
ib_instance_role="ec2-ib-instance-role"

# EC2 Image Builder Instance Profile
ib_instance_profile="ec2-ib-instance-profile"

# EC2 Image Builder Security Group
ib_security_group="ec2-ib-instance-sg"