CmdID

CmdID / aws / aws ec2

aws ec2 delete-key-pair

Deletes the specified key pair, by removing the public key from Amazon EC2. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To delete a key pair

The following delete-key-pair example deletes the specified key pair.

aws ec2 delete-key-pair --key-name my-key-pairIdentify
--key-nameThe name of the key pair.
Its output
{
    "Return": true,
    "KeyPairId": "key-03c8d3aceb53b507"
}

For more information, see Create and delete key pairs in the AWS Command Line Interface User Guide.

Options

3 in the AWS CLI reference
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.
--key-nameThe name of the key pair.
--key-pair-idThe ID of the key pair.