HEX
Server: Apache
System: Linux vmi1259262.contaboserver.net 5.15.0-170-generic #180-Ubuntu SMP Fri Jan 9 16:10:31 UTC 2026 x86_64
User: aqarnomics (1008)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //usr/share/doc/awscli/examples/ec2/delete-key-pair.rst
**To delete a key pair**

This example deletes the key pair named ``MyKeyPair``. If the command succeeds, no output is returned.

Command::

  aws ec2 delete-key-pair --key-name MyKeyPair

For more information, see `Using Key Pairs`_ in the *AWS Command Line Interface User Guide*.

.. _`Using Key Pairs`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html