Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon ec2 Can';t将图像添加到AWS自动缩放启动配置_Amazon Ec2_Amazon Web Services_Ec2 Ami - Fatal编程技术网

Amazon ec2 Can';t将图像添加到AWS自动缩放启动配置

Amazon ec2 Can';t将图像添加到AWS自动缩放启动配置,amazon-ec2,amazon-web-services,ec2-ami,Amazon Ec2,Amazon Web Services,Ec2 Ami,我正在使用以下命令设置AWS启动配置: as-create-launch-config test1autoscale --image-id ami-xxxx --instance-type m1.small 其中ami xxxx是我通过web控制台从实例获得的映像id。我得到以下错误: Malformed input-AMI ami-xxxx is invalid: The AMI ID 'ami-xxxx' does not exist 我已三次检查映像id是否与实例映像id匹配。我的可用

我正在使用以下命令设置AWS启动配置:

as-create-launch-config test1autoscale --image-id ami-xxxx --instance-type m1.small
其中ami xxxx是我通过web控制台从实例获得的映像id。我得到以下错误:

Malformed input-AMI ami-xxxx is invalid: The AMI ID 'ami-xxxx' does not exist

我已三次检查映像id是否与实例映像id匹配。我的可用区域是ap-东南-1a。我不清楚需要什么图像如果它不接受我希望添加到自动缩放组的实例的图像,请尝试将区域端点(因为默认情况下它查看的是us-east-1 enpoint)添加到您的config命令中,然后它应该可以工作:

as-create-launch-config test1autoscale --region ap-southeast-1 --image-id ami-xxxx --instance-type m1.small

另请注意:问题可能是由于错误的区域造成的。另外,不要忘记更改API端点,方法是使用-U http://xxx或设置AWS_AUTO_SCALING_URL环境变量(至少在Linux上导出AWS_AUTO_SCALING_URL=http://…)。不要忘记url中的http或https。[请注意,地址必须没有空格。我必须将它们放在一起,否则地址将转换为链接:-)]