AWS::Lightsail::KeyPair

Lightsail KeyPair

Resource Type definition for AWS::Lightsail::KeyPair

Properties

2 configurable properties. 1 required. Click a row to see details.

Filter:
PropertyTypeFlags
KeyPairName
string
RequiredCreate-only
Tags
Array<Tag>

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
CreatedAtstringThe timestamp when the key pair was created.
FingerprintstringThe RSA fingerprint of the key pair.
KeyPairArnstringThe Amazon Resource Name (ARN) of the key pair.
LocationResourceLocation-
ResourceTypestringThe Lightsail resource type (KeyPair).
SupportCodestringThe support code. Include this code in your email to support when you have questions about a key pair in Lightsail.

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::Lightsail::KeyPair

Resources:
  MyResource:
    Type: AWS::Lightsail::KeyPair
    Properties:
      KeyPairName: "my-keypairname"
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

lightsail:CreateKeyPairlightsail:GetKeyPairlightsail:TagResource

read

lightsail:GetKeyPair

update

lightsail:GetKeyPairlightsail:TagResourcelightsail:UntagResource

delete

lightsail:DeleteKeyPairlightsail:GetKeyPair

list

lightsail:GetKeyPairs

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceLightsail
Properties8
Required1
TaggingSupported
Primary IDKeyPairName

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

KeyPairName

External Links