HEX
Server: Apache
System: Linux pdx1-shared-a2-09 6.6.116-grsec-jammy-dirty #1 SMP Sat Nov 8 00:02:42 UTC 2025 x86_64
User: dh_pvsc7i (5084578)
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
        }
    }