ec2-delete-keypair

Description

Deletes the specified key pair, by removing the public key from Amazon EC2. You must own the key pair.

Syntax

ec2-delete-keypair key_pair

Options

NameDescriptionRequired

key_pair

Name of the key pair to delete.

Type: String

Default: None

Example: primary_keypair

Yes

Output

The command returns a table that contains the following information:

  • KEYPAIR identifier

  • Name of the deleted key pair

  • Private key fingerprint

Amazon EC2 displays errors on stderr.

Examples

Example Request

This example deletes the gsg-keypair key pair.

PROMPT> ec2-delete-keypair gsg-keypair
KEYPAIR gsg-keypair