解决有效的图像值误差误差、图像、有效

由网友(玩霸)分享简介:我想创建和使用刀EC2宝石和厨师部署PostgreSQL服务器到AWS。在我的项目我的 .chef 资料库我有 knife.rb 文件。以下是该文件的内容。I'm trying to create and deploy a PostgreSQL server to AWS using the knife-ec2 ge...

我想创建和使用刀EC2宝石和厨师部署PostgreSQL服务器到AWS。在我的项目我的 .chef 资料库我有 knife.rb 文件。以下是该文件的内容。

I'm trying to create and deploy a PostgreSQL server to AWS using the knife-ec2 gem and chef. In my .chef repository of my project I have the knife.rb file. Here are the contents of that file.

cookbook_path [ 'Users/Petesta/Git/ringbase/chef/cookbooks' ]

knife[:aws_access_key_id] = "randomString"

knife[:aws_secret_access_key] = "randomString"

knife[:aws_ssh_key_id] = "default"

knife[:flavor] = "t1.micro"

knife[:image] = "ami-6aad335a"

knife[:region] = "us-west-1"

knife[:availability_zone] = "us-west-1a"

比方说我的质子交换膜文件被命名为 default.pem 。我已经把价值的关键 aws_ssh_key_id 默认 default.pem 。我环顾四周,一个帖子中提到不包括质子交换膜扩展。但它仍然产生了同样的错误。

Let's say my .pem file is named default.pem. I've put the value for the key aws_ssh_key_id as default and default.pem. I was looking around and a post mentioned excluding the .pem extension. But it still produced the same error.

,然后当我运行命令刀EC2服务器上创建角色[PostgreSQL的::服务器]我得到的错误。

And then when I run the command knife ec2 server create "role[postgresql::server]" I get the error.

错误:您没有提供有效的映像(AMI)的价值。请注意,短选项该值从'-i'到'-I'最近改变。

Error: You have not provided a valid image (AMI) value. Please note that the short option for this value recently changed from '-i' to '-I'.

我不知道该怎么做。任何人有什么想法?

I'm not sure what to do. Anyone have any ideas?

我也试过手动在命令行上指定它。

I've also tried manually specifying it on the command line.

推荐答案

所以,问题是,我用的是AMI不在同一区域。在AMI是不是在美国西1,但在美国西部-2并没有匹配的关键区域的价值。

So the issue was that the AMI I was using is not in the same region. The AMI was not in us-west-1 but in us-west-2 and didn't match the value for key region.

阅读全文

相关推荐

最新文章