Client.InvalidKeyPair.NotFound: The key pair does not exist
Misleading error message and the EC2 Console works, the keypair.pem file is present in both the AWS WebGUI and on the client running the ec2-api-tools.
[dc@rs0 ~]$ ec2-describe-keypairs
if you get nothing from running ec2-describe-keypairs, run ec2-add-keypair xxx
where xxx is name of the xxx.pem file. Leave the .pem extension off. It should respond with the contents of the xxx.pem file as listed below. Then run ec2-describe-keypairs and you should see your keypair loaded.
THIS CANNOT BE DONE FROM THE EC2 web interface.
[dc@rs0 ~]$ ec2-add-keypair absolutesw
KEYPAIR absolutesw 28:71:d2:48:b1:f1:e1:13:8c:42:84:5d:22:a0:f9:9d:83:ba:ad:29
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAkk7MlOwD7vE0AapuPMGte1o6849Wm/NOfZA3vmZXRwke31h5notNPluwvYTL
d6xRycvb3sDvQU6iiNjC+ZI/gBi7nRClKHA6wV2S9LWma7qoknr1mt5amvAA5IH0n8brhG0yjefS
lqu7SMFK8AIhVRrqbdxpMcx17xp1BW/K5sxKzPGeVQTU/F3oRGjtvWDDBAmt96F96XSRQkmXReyK
3c+IvupSRLC5grvL7aL4sKcXhA2ktWSDDUQQ9y8HxRpM6vRQusLKjGuJ6cNJMzrajtMOMQFU5Aoo
4Z3XH38rUQnpmC8erP0ysFLSqRENkuqmeCrvqgUW3zszU8juS4bU5wIDAQABAoIBACIneQSu0ABA
-----END RSA PRIVATE KEY-----
This display is misleading:
because it shows the keypairs as loaded. They are loaded but this is a different interface than the command like tools!!!
This was very helpful to me. However you probably shouldn't display your private key to the world.
ReplyDeleteThanks for providing this informative information you may also refer.
ReplyDeletehttp://www.s4techno.com/blog/2015/12/21/protect-instances-from-termination-by-auto-scaling/