Troubleshooting - AWS EC2 - "Load key '/documents/awskey.pem' : bad permissions

Problem:

This error is encountered when attempting to connect to an EC2 instance via SSH with a .pem file that doesn’t have the appropriate linux filesystem permissions in place.

Recommended Fix:

  • CD to the directory where the file exists

  • Type : sudo chmod 400 <filename>

The next time you run ssh it should work.

Background:

I ran into this issue on a Macbook Pro running OS X. My file permissions were “too open” for use. The file permissions before I made the change were set to 0644 which threw the error.

#vDM30in30 - Day2 Signing Up for Amazon AWS

Confession time - I've never set up my own AWS instance.  Ever.  I've read about it, and I've even taken training for AWS; but I've never setup my own AWS anything for personal use.  I've used competitive offerings such as MS Azure and Verizon's Terremark, but not AWS.  I decided to take the plunge today since #vDM30in30 is about new experiences, learning, and experimentation.  This post will cover my general impressions of the AWS sign up process.

So how did it go?  Well, My honest impression of the setup process is that it probably could have been a little easier.  I decided to select the Free tier.  I was asked to sign up.  The login / sign up dialogue box resembled the same screen used for buying products through Amazon, however, the same UID / pw combination didn't work.  It's a new and separate account.  It's a minor annoyance but definitely not a show stopper.

Next, I had to verify my tier.  Amazon does a pretty good job of explaining what you get for free.  The problem is in knowing if it's enough.  In addition, only a small subsection of services are mentioned.

After some basic payment info, I thought I'd be done.  Not so fast!  Amazon does an interesting and welcome Identity verification check where an automated system calls a telephone number you provide.  Upon answering the call, the applicant enters a four digit code that's provided onscreen.

AWS Identity Verification Screen

AWS Identity Verification Screen

The applicant is then asked to review the support plan options.  Nothing here is too surprising, but the upper tiers really provide what appears to be exceptional support.  Then again for a minimum of $15,000 an enterprise should receive "white glove case handling."  Also eye-catching is the fact that telephone support isn't available for anything less than $100.  Basic developer level support allows for e-mailing support.

 

 

There's a lot of information, and I could see how someone buying AWS in a shadow IT ops type of situation would make a mistake by either buying too much or not enough support.

So after all of the screens and choices, I signed into the console and was overwhelmed by the choices.  The vast number and types of options was intimidating.  It reminded me of a friend who installed Oracle back when he was starting out in IT.  Upon seeing a screen full of icons he asked, "So what do I do now?"  I had a very similar feeling looking over the ocean of choices.

Amazon_AWS_01_06.png

The last few years have been filled with warnings of Shadow Ops.  This concept of non-IT departments buying and deploying cloud-based services on their own without the knowledge or consent of a centralized IT department.  Based on what I just experienced, I see this trend slowing down when it comes to AWS.  AWS has added tons of features.  So many features, I'd argue that the complexity associated with deploying an app properly has also increased.  Confronted by all of these options it seems unlikely for a less sophisticated power user to go out and deploy an app on AWS.  Amazon makes sign up and payment easy, but that's not the difficult part.