I'm lucky enough this semester to be taking CS 5300 at Cornell, a class entitled "The Architecture of Large-Scale Information Systems." For this class, we will need to know our way around Amazon's Web Services. I learned a lot about AWS when I worked at 6Wunderkinder last year, so I was feeling up to the challenge. Little did I know that the tooling 6W had created around its ops was far superior to anything else out there.
I already had an AWS account, so my first step was to find a good CLI. I did the logical thing, and asked Google. Turns out, Amazon ships its own
aws client, written in Python and shipped via
pip. Marvelous! I ran
pip install aws,
aws configure and presto, I was in business.
Our first question asked us to launch an instance of the AMI
ami-bba18dd2, a simple Fedora distribution. After asking for the man pages for
aws in 6 different ways, I got them. I discovered I would need to specify the instance type and security group as well. So I created a security group and went ahead:
Yay, it worked! Ok, now I need to ssh into this bad boy.
Huh? What's that all about? I had created a key pair from previous messing around with EC2. Hm... After a few minutes of puzzlement, I realized I needed to pass another option to my
aws ec2 command. Let's try this again:
Booted! Now, let's try to ssh again:
Bollocks! Looks like I am still missing something...
Ah! After taking a look at a tutorial, I realize I need to login as
ec2-user. Let's give this one more try:
YES! I did it. Ok, so lessons:
- Login as
ec2-user, not as
albieor any other name.
- Make sure you specify the
key-namefor the instance(s) you want to launch.
- Always err on the side of being more specific. Defaults can be bad.
- Always terminate once you're done using the box.
Simple fixes for problems that seem so intractible.