Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed my ec2 tools in my command line. I can use it for creating a new instance and other similar operations. Now I wish to play with the auto_scaling tool.

I installed it and edited my .bashrc profile. But when I try to issue commands like :

as-create-launch-config {your_launch_config_name} --image-id {your_ami_id} --instance-type t1.micro --key {your_access_key} --group {your_group_name}

I'm getting an error:

as-create-launch-config:  Malformed input-The content of the file: /opt/privateKey.pem, is not a valid
 private key
Usage:
as-create-launch-config
        LaunchConfigurationName  --image-id  value  --instance-type  value
       [--block-device-mapping  "key1=value1,key2=value2..." ]
       [--iam-instance-profile  value ]
       [--monitoring-enabled/monitoring-disabled  ] [--kernel  value ] [--key 
       value ] [--ramdisk  value ] [--group  value[,value...] ] [--spot-price 
       value ] [--user-data  value ]  [General Options]
For more information and a full list of options, run "as-create-launch-config --help"

I use the same private key for ec2 command line tools, that works. I created the certificate by following the instruction from here.

Where I'm making the mistake?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Convert your private key to pkcs8 format to see if it works:

openssl pkcs8 -topk8 -in /opt/privateKey.pem -nocrypt > /opt/privateKey-temp.pem
mv /opt/privateKey-temp.pem /opt/privateKey.pem
share|improve this answer
    
This seems to be working. Cool thanks. –  batman Sep 11 '12 at 7:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.