ec2-bundle-vol

ec2-bundle-vol -k PRIVATE-KEY-u USER-ID -s SIZE [-d DESTINATION-DIR] [-e EXLCUDE-DIR-1,EXCLUDE-DIR-2...] [-p AMI-PREFIX] [-v VOLUME]

Create a bundled AMI by taking a snapshot of the local machine's root file system, compressing, encrypting and signing the snapshot.

Status messages indicating the various stages of the bundling process are displayed.

Note:

Note that this tool does not support the common arguments

OptionDefinitionRequired?Example
-k, --privatekey KEY The path to the user's PEM encoded RSA key file. Yes-k $HOME/pk-234242DEADCAFE.pem
-u, --user USER The user's EC2 user ID (a.k.a. AWS account number). Yes-u 123456789
-s, --size SIZE The size, in MB (1024 * 1024 bytes), of the image file to create. The maximum size is 10240 MB. Yes-s 2048
-d, --destination DESTINATION The directory in which to create the bundle. Defaults to "/tmp". No-d /var/run/my-bundle
-e, --exclude DIR1,DIR2,... A list of absolute directory paths to exclude from the bundle operation. Note that it overrides the '--all' parameter. No-e /tmp,/home/secret-data
-p, --prefix PREFIX The filename prefix for bundled AMI files. Defaults to "image". No-p my-image-is-special
-v, --volume VOLUME The absolute path to the mounted volume to create the bundle from. Defaults to "/". No-v /mnt/my-customized-ami
-a, --all Bundle all directories, including those on remotely mounted filesystems. No-a
--help Display the help message. No--help
--manual Display the user manual. No--manual
$ ec2-bundle-vol -d /mnt -k ~root/pk-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem -u 495219933132 -s 1536
Copying / into the image file /mnt/image.img...
Excluding: 
     sys
     dev/shm
     proc
     dev/pts
     proc/sys/fs/binfmt_misc
     dev
     media
     mnt
     proc
     sys
     tmp/image.img
     mnt/img-mnt
1+0 records in
1+0 records out
mke2fs 1.38 (30-Jun-2005)
warning: 256 blocks unused.

Splitting /mnt/image.gz.crypt...
Created image.part.00
Created image.part.01
Created image.part.02
Created image.part.03
...
Created image.part.22
Created image.part.23
Generating digests for each part...
Digests generated.
Creating bundle manifest...
Bundle Volume complete.