v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14159650798.5 KB

Creates a custom SSH key pair that you can use with an Amazon Lightsail instance.

Use the DownloadDefaultKeyPair action to create a Lightsail default key pair in an Amazon Web Services Region where a default key pair does not currently exist.

The create key pair operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide.

post/#X-Amz-Target=Lightsail_20161128.CreateKeyPair

Headers

X-Amz-Target'Lightsail_20161128.CreateKeyPair' required

Request body

keyPairNamestring required

The name for your new key pair.

Response

Success

publicKeyBase64string

A base64-encoded public key of the <code>ssh-rsa</code> type.

privateKeyBase64string

A base64-encoded RSA private key.