A tool for creating AWS AMI from a base AMI and an install packages script


After installed aws-ami. Setup aws access env variables:

export AWS_ACCESS_KEY_ID='your aws access key id'
export AWS_SECRET_ACCESS_KEY='your aws secret access key'

Pick base ami and setup base_ami_yml file (As we use user-data to inject install_packages_script to install packages, the base AMI need support user-data.):

us-west-1: ami-102923
eu-west-1: ami-232340

write a script to install packages on the AMI ( example):

#!/bin/sh -eu
sudo apt-get install rubygems

Then you should be ready to run the following command to create a new AMI:

aws-ami -n ami_name -r us-west-1 -f -k ssh_key_name -b base_ami_yml_path

All options:

aws-ami -h