HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/awscli/examples/lightsail/delete-key-pair.rst
**To delete a key pair**

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

    aws lightsail delete-key-pair \
        --key-pair-name MyPersonalKeyPair

Output::

    {
        "operation": {
            "id": "81621463-df38-4810-b866-6e801a15abbf",
            "resourceName": "MyPersonalKeyPair",
            "resourceType": "KeyPair",
            "createdAt": 1569874626.466,
            "location": {
                "availabilityZone": "all",
                "regionName": "us-west-2"
            },
            "isTerminal": true,
            "operationType": "DeleteKeyPair",
            "status": "Succeeded",
            "statusChangedAt": 1569874626.685
        }
    }