# Documentaion of command line tools <a href="http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-by-function.html" target="_top">http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-by-function.html</a> <p /> # Getting started guide <a href="http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide/" target="_top">http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide/</a> <p /> <p /> # Video Tutorials <p /> # Using a public instance <a href="http://s3.amazonaws.com/AmazonEC2Tutorial/AmazonEC2Tutorial.html" target="_top">http://s3.amazonaws.com/AmazonEC2Tutorial/AmazonEC2Tutorial.html</a> <p /> # Customizing an instance once its launched <a href="http://s3.amazonaws.com/awsVideos/CustomizeAnExistingAMI/Customize%20an%20Existing%20AMI.html" target="_top">http://s3.amazonaws.com/awsVideos/CustomizeAnExistingAMI/Customize%20an%20Existing%20AMI.html</a> <p /> # Things to Have: # Private key and 509 certficate, access Key ID, and secret access key. # from amazon once logged into web portal <p /> # Things to `Make' # ssh key pair with ec2-add-keypair NAME # (public uploaded to amazon, private to std out) <p /> # S3 bucket (for uploading an img) <p /> <p /> Bundle an img made via loop back: <p /> ec2-bundle-image -k secret-key.pem -u uid -i image.img -d <dest path> -p <prefix> <p /> (Creates a bundle that can be uploaded with ec2-upload-bundle as well as a manifest for use with ec2-register.) <p /> <a href="http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-ami-bundle-image.html" target="_top">http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-ami-bundle-image.html</a> <p /> Upload an img: <p /> ec2-upload-bundle -b S3-BUCKET -m MANIFEST-PATH -a AWS-ACCESS-KEY-ID -s AWS-SECRET-KEY [--acl ACL] [--ec2certificate PATH] [-d DIRECTORY] [--part PART] [--url URL] [--retry] [--skipmanifest] <p /> <p /> <a href="http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-ami-upload-bundle.html" target="_top">http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-ami-upload-bundle.html</a> <p /> Register an img: <p /> ec2-register MANIFEST <p /> (Returns an AMI name for use with ec2-run-instance.) <p /> <a href="http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-register.html" target="_top">http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-register.html</a> <p /> <p /> # Or can use a public instance described by ec2-describe-images[AMI ...] [-a] [-o OWNER ...] [-x USER] <p /> Run an instance: <p /> ec2-run-instances AMI [-n INSTANCE_COUNT] [-g GROUP [-g GROUP ...]] [-k KEY] [-d USER_DATA | -f FILE_NAME] <p /> (-k adds private public key pair to img, so can ssh into it) (This command can take up to 10 mins to start an img and starts charges) (-d or -f allow for each img to get up to 16kb of data, but is placed in a need wget to get at data) <p /> <a href="http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-run-instances.html" target="_top">http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-run-instances.html</a> <p /> Get instance URL and imgname: <p /> ec2-describte-instances (returns hostname of all imgs, how to ssh in.) (returns imgname for use with terminating instance) <p /> Authorize ports: <p /> ec2-authorize GROUP [-P PROTOCOL] (-p PORT_RANGE | -t ICMP_TYPE_CODE) [-u SOURCE_GROUP_USER ...] [-o SOURCE_GROUP ...] [-s SOURCE_SUBNET ...] <p /> (Changes firewall rules) ec2-authorize default -p 22 # ssh ec2-authorize default -p 80 # http <p /> <p /> End an instance: <p /> ec2-terminate-instances INSTANCEID [INSTANCEID ...] <p /> Other : 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] <p /> (Can be used instead of ec2-bundle-image to bundle everything above a given directory (including '/'.) <p /> # Other: ec2-get-console-output INSTANCEID <nowiki>
Last updated January 22, 2009 08:36, by Eric Lalonde





