Create an AMI
ec2-bundle-vol -d /mnt -p descriptivePrefixName -u AWSuserID -r x86_64 -k /path/privateKey.pem -c /path/X509certificate.pem -e /mnt,/tmp,/root/.ssh ec2-bundle-vol -d /mnt -p Apache_webapp02_184.73.213.77_062910 -u 2574-6614-1454 -r x86_64 -k EC2_DEV2.pem -c cert-BZR7XRTWIXSZNZGEREUSM5IHNXSPVJXC.pem -e /mnt,/tmp,/root/.ssh -k, --privatekey KEY The path to the user's PEM encoded RSA key file. Ex: pk-234242DEADCAFE.pem -u, --user USER The user's EC2 user ID (a.k.a. AWS account number). Ex:-u 123456789 -d, --destination DESTINATION The directory in which to create the bundle. Defaults to "/tmp". -e, --exclude DIR1,.. A list of absolute directory paths to exclude. -p, --prefix PREFIX The filename prefix for bundled AMI files. Defaults to "image".
Upload Bundle
ec2-upload-bundle -b s3bucketName -m /tmp/descriptivePrefixName.manifest.xml -a accessKeyID -s secretAccessKey -b The Amazon S3 bucket name to store at. ( strmami ) -m The path to the manifest file. -a The user's AWS access key ID. -s The user's AWS secret access key.
Connect to EC2 Instance
ssh -i privateKey.pem username@ipOrPublicDNS