I keep getting
Fog::Compute::AWS::NotFound: The key pair ... does not exist
error!
How to solve this problem isn’t explained well enough anywhere.
Install knife-ec2
first:
sudo gem install knife-ec2
Then I added this to my knife.rb
:
|
|
As I was trying to create an instance with this command:
knife ec2 server create -G "default" -r 'recipe[monit]'
I kept getting following error:
Fog::Compute::AWS::NotFound: The key pair 'my-ec2-key' does not exist
It turned out, 2 hours later, in order to fix this I had to run:
ssh-add ~/.ssh/my-ec2-key.pem
It worked.