2010-08-24 229 views
3

我正在使用PHP库Zend与Amazon EC2一起工作。我创建了自己的图像(AMI),它是一个x84_64机器(即不是默认的i386体系结构)。我想使用Zend以编程方式从PHP启动它。 Zend提供了一个'运行'方法来运行AMI(参见http://framework.zend.com/manual/en/zend.service.amazon.ec2.instance.html)。使用Zend启动x86_64 Amazon EC2实例?

然而,当我尝试运行它,我得到以下异常:

PHP Fatal error: Uncaught exception 'Zend_Service_Amazon_Ec2_Exception' with message 'The requested instance type's architecture (i386) does not match the architecture in the manifest for ami-faa48e8e (x86_64)' in /usr/local/Q/libs/zend/library/Zend/Service/Amazon/Ec2/Abstract.php:273

如何运行这个AMI,并告诉Zend公司,它是x86_64的?文档没有对此做任何说明。

回答

4

Zend doc说你需要指定instanceType。

对于x86_64 AMI,您需要指定实例类型为large,xlarge和其他大型类型。而i386 AMI只需要m1.small或m1.medium。

参阅:http://aws.amazon.com/ec2/instance-types/