I'm trying to use knife ec2 server create to automatically launch ec2 instances for the first time, but I'm getting "ERROR: Excon::Errors::BadRequest: Expected(200) <=> Actual(400 Bad Request)"
.
When using knife ec2 server list
the list of existing servers is returned, which means the AWS IDs in .chef/knife.rb
are correct.
I checked AMI ID using Ubuntu's AMI Finder, and tried different combinations of all other parameters, so can't figure out what's wrong.
I'm using is:
knife ec2 server create \
-r "role[memcached]" -I ami-d0f89fb9 -f m1.small \
-i mysshkey.pem --ssh-user newuser \
--region us-east-1b -Z us-east-1b
(there is a Chef role called memcached
, there's a file in the local directory called mysshkey.pem
)
Environment: Win7, Git 1.8.1.msysgit.1, Chef/Knife 11.4.4. I will try later doing the same from a Linux workstation, so I can isolate if the problem is the environment, or paramenters, or AWS credentials.
Any idea how to troubleshoot knife ec2 scripts?