Posts Tagged ‘AWS’
3 steps to Bundle Amazon EC2 Image
December 14, 2009
Leave a comment
Following are the 3 easy steps to bundle an Amazon EC2 Instance to an AMI (Amazon Image)
These steps require Amazon EC2 API tools to be installed on your system.
<and private key, certificate and access keys for your AWS account>
Step 1.
Login to the Unix / Linux instance and run the following command to create a bundle
Prompt> ec2-bundle-vol --destination /mnt/bundle-image/
--prefix <target image prefix>
--cert <Path to X509 Certificate>
--privatekey <Path to X509 private key >
--user <AWS Account Number>
--exclude <exclude dir if any>
Step 2.
Execute following command to upload the Bundled Image to Amazon S3 Bucket –
Prompt>ec2-upload-bundle
-b $bucket
-m /mnt/bundle-image/$prefix.manifest.xml
-a $AWS_ACCESS_KEY_ID
-s $AWS_SECRET_ACCESS_KEY
Step 3.
Now that the AMI files have been uploaded to S3, you register the image as a new AMI.
This is done back with the EC2 API tools installed:
Prompt> ec2-register $bucket/$prefix.manifest.xml