This is a collection of tidbits I’ve picked up as I’ve worked through the last few posts
about working with Amazon EC2. Nothing’s big enough to deserve its own post, so I’ve
decided to lump them all together here.
If you’re running on Mac OS X, you can install the EC2 API command-line tools via
Elastic IP addresses
If you’ve been following along at home, you probably
noticed that when you start an EC2 instance it is assigned a new IP address by AWS.
This isn’t much of a problem for S3-backed instances, as they pretty much restart from scratch
every time you start them, but for EBS-backed instances it would be handy if we could get the
same IP address every time. AWS gives us a way to do this, with elastic IP addresses.
First, you allocate a static IP address from AWS.
As with EBS volumes, once you allocate an address, you start paying for it. The good news is,
you don’t pay extra for it as long as it’s associated with a running EC2 instance.
Note that both the external IP address and the external name changed, to
220.127.116.11 and ec2-50-17-204-89.compute-1.amazonaws.com respectively.
When the EC2 instance is stopped or terminated, the IP address is disassociated,
and you can associate it with a different EC2 instance (or the same one, if you restart it).