Playing with your free Amazon EC2 Micro instance on Mac

Reading time ~1 minute

I have a couple VPS’s already but I decided to mess around with the free micro EC2 Amazon provides as part of their AWS service.  I already use S3 and some other features so I figured I’d give this a shot.  It’s pretty simple to set up out of the gate but there are a couple gotchas.  I’ll edit/update this post as I encounter them but here’s the first one.

Connecting to your instance. Setting up your Keypair

During the wizard setup portion of your EC2 setup you’ll create a keypair.  There are a couple things you’ll need to do when working on a Mac to get this to work.

  1. You need to change the read/write permissions.chmod 600 ~/path/to/your/keypair.pem
    This will fix any Warning Unprotected Private Key File errors you may get.
  2. Add the keypair identity to your ~/.ssh<

    folder. This is done by running the command

    ssh-add ~/.ssh/keypair.pem
    
  3. Connect using the key pair. Even though you’ve added the keypair to your ~/.ssh

    you are still going to need to declare the keypair when you ssh into the box. To ssh into the box the command is

    ssh -i ~/.ssh/id_rsa [email protected]
    

    The -i flag lets ssh know that you’re using an identity file. Also, notice you log in as an ec2-user and not root. Trying to log in as root will cause the VM to bark at you and hang until you break the connection. Well that’s it for now. Next step is to set up the box for Rails. I’ll try and update this blog soon with that howto.

    Have fun!

Writing Node.js Apps from Scratch

Satirical posts regarding the bloat of modern day apps are a hot topic of both memes and [dev discussion boards](https://hackernoon.com...… Continue reading

Servicing Your Actual Customer

Published on May 26, 2016

Testing your APIs with Cucumber

Published on August 02, 2015