To delete a key pair
This example deletes the key pair named MyKeyPair.
Command:
aws ec2 delete-key-pair --key-name MyKeyPair
Output:
{
"return": "true"
}
For more information, see Using Key Pairs in the AWS Command Line Interface User Guide.