How-to: Get started with Amazon EC2

Amazon cloud skills are in high demand. This easy, step-by-step guide will help start you on your path to cloud mastery

By Sean Hull, InfoWorld |  Cloud Computing, Amazon EC2, Amazon Web Services

Once you know the IP address to the box, go ahead and connect:

$ ssh -i my-keypair ec2-user@

A few routine tasksFolks familiar with Linux Volume Manager know that you can easily snapshot a disk volume. In Amazon, snapshots are a powerful facility for creating backups, protecting you from instance failure, and even creating new AMIs from your custom server setups. Look at the BLOCKDEVICE line above. You'll see the volume ID. That's all you need:

$ ec2-create-snapshot vol-3f1ac253

A few details to keep in mind: Although you can snapshot a running server, some tools will stop your instance in order to snapshot the root volume. This is for extra protection against corruption of the file system. If you're using a journaling file system such as ext3, ext4, or xfs, snapshotting a running system will leave your volume in a state similar to a crashed server. Upon startup, incomplete blocks will be repaired. In the case of a database mount such as MySQL, however, you should issue these additional commands from the MySQL shell:

mysql > flush tables with read lock;mysql > system xfs_freeze -f /data

For an in-depth explanation of how to do this, see my article, "Autoscaling MySQL on Amazon EC2."

When instances are started, Amazon automatically assigns a new IP address to them. Dynamic addresses are fine for playing around, but you'll undoubtedly want static, global IP addresses for some machines eventually. That's where elastic IP addresses enter the picture; your AWS account comes with a number of these. You can set your new instance with one of these static IPs using a simple command-line call:

$ ec2-associate-address -i i-17086273

You're all set.

Now that you've had a taste of Amazon, you'll want to explore more. With the command-line tools installed and your security keys set up, you have everything you need to go further -- and get comfortable with different instance types, various AMIs, the Availability Zones your instances and volumes are stored in, how load balancers work, and beyond. The further you go, the more you'll appreciate that Amazon's documentation is as copious as its services.

Originally published on InfoWorld |  Click here to read the original story.
Join us:






Spotlight on ...
Online Training

    Upgrade your skills and earn higher pay

    Readers to share their best tips for maximizing training dollars and getting the most out self-directed learning. Here’s what they said.


    Learn more

Cloud ComputingWhite Papers & Webcasts

See more White Papers | Webcasts

Answers - Powered by ITworld

Ask a Question