我在我的命令行中安装了我的ec2工具。 我可以使用它来创build一个新的实例和其他类似的操作。 现在我想玩auto_scaling工具。
我安装了它并编辑了我的.bashrcconfiguration文件。 但是,当我尝试发出命令如:
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}
我收到一个错误:
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"
我使用相同的私钥ec2命令行工具,工作。 我按照这里的指示创build了证书。
我犯了什么错误?
将您的私钥转换为pkcs8格式以查看它是否有效:
openssl pkcs8 -topk8 -in /opt/privateKey.pem -nocrypt > /opt/privateKey-temp.pem mv /opt/privateKey-temp.pem /opt/privateKey.pem