Folks,
How to create EC2 instance in VPC using Knife?
I added aws access key and secret key in knife.rb .
I was running command as
knife ec2 server create –I ami-456b493a -S D:/Key/ec2.pem –f t2.small -x ubuntu –g sg-qwe2d4 -s subnet-12a456 -VV
For this I got ERROR as
ERROR: InvalidParameterCombination => VPC security groups may not be used for a non-VPC launch
This is my Knife.rb file
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "raju"
client_key "#{current_dir}/raju.pem"
chef_server_url "https://api.chef.io/organizations/NAME"
cookbook_path ["#{current_dir}/../cookbooks"]
knife[:aws_access_key_id] = "********"
knife[:aws_secret_access_key] = "*************"
Was there any configuration mistake?
Do I need to open ports?