Download
Download the latest Amazon EC2 AMI Tools from Amazon S3:
The Amazon EC2 AMI Tools are available in the Amazon Linux AMI repositories as the aws-amitools-ec2 package.
Changelog
Version 1.5.7
ec2-upload-bundleadds STS credentials to sigv4-style request headers.
Version 1.5.6
- We have added support for the EU (Frankfurt) region.
Version 1.5.5
- Be more compatible with various versions of Ruby (1.8, 1.9, and 2.0).
Version 1.5.4
- Ensure that the filesystem features of newly created AMIs more closely match the features of the root filesystem that they were created from. This fixes a bug with the tools that prevented a rebundled 2014.09 Amazon Linux AMI from booting.
Version 1.5.3
- Fixed
ec2-upload-bundlebehavior when the upload bucket doesn't exist. ec2-upload-bundlenow works with S3 buckets that contain dots '.'- Removed dependency on 'which' shell builtin.
Version 1.5.2
- We have added support for the China (Beijing) region.
- We have added support for rebundling partitioned images. MBR/GPT partitioned AMIs may now be rebundled, which means that supported instance-store HVM AMIs may now be rebundled.
- Users can now execute an arbitrary script via the
--scriptflag. This script is executed after image cloning has been completed. An example use case would be a complex find command used to remove specific files from the cloned image before bundling begins.
For example, if we had a bash script named rm-priv.sh with the following contents:
#!/bin/bash
mnt_dir="${1}"
find "${mnt_dir}" -type f -name "*.priv" -exec rm -f {} \;
We could use it like this:
sudo ec2-bundle-vol -arch x86_64 --user XXXXXXXXXXXX --cert cert.pem --privatekey pk.pem --script /home/ec2-user/rm-priv.sh
--include and --exclude wildcard
behavior. For example, sudo ec2-bundle-vol --arch x86_64 --user
XXXXXXXXXXXX --cert cert.pem --privatekey pk.pem --exclude
/root/.ssh,/home/ec2-user/.ssh --include "/home/ec2-user/files/*.pem"--clone-only flag to ec2-bundle-vol. This allows users to stop the bundling procedure right after a copy of the user-specified volume has been created, and is useful for debugging if an image isn't bundling properly.--grub-config to ec2-bundle-vol. This enables specifying a specific grub configuration file to use during bundling, and is an alternative to directly editing the instance's grub configuration. At this time, only legacy grub(0.97) configuration files are supported.Known Issues
- When rebundling EBS-backed HVM AMIs as instance-store, use
--block-device-mapping ami=sda,root=/dev/sda1,ephemeral0=sdb,ephemeral1=sdc,ephemeral2=sdd,ephemeral3=sde - The EC2 AMI Tools will fail to generate a bootable image on systems that have SELinux enabled, due to permission errors at boot time. SELinux will need to be disabled before the bundling process begins, and a reboot will be required.