Error/Fix: Error: Invalid Private Key with Amazon ELB

When setting up an Amazon Elastic Load Balancer (ELB) with SSL:

Error: “Error: Invalid Private Key” when attempting to upload your keyfile to Amazon EC2


Convert the key to a format that ELB likes with the command:

openssl rsa -in somekeyfile.key -outform PEM

edit: I got this message today “Error: Unable to parse certificate.” when I was adding a new SSL certificate for a loadbalancer. It turned out to be my key. The command above fixed it.