KeyPairFormat Enum
The format of the Key Pair.
Example
ts
declare const vpc: ec2.Vpc;
declare const instanceType: ec2.InstanceType;
const keyPair = new ec2.KeyPair(this, 'KeyPair', {
type: ec2.KeyPairType.ED25519,
format: ec2.KeyPairFormat.PEM,
});
const instance = new ec2.Instance(this, 'Instance', {
vpc,
instanceType,
machineImage: ec2.MachineImage.latestAmazonLinux2023(),
// Use the custom key pair
keyPair,
});
Members
| Member | Description |
|---|---|
PPK | A PPK file, typically used with PuTTY. |
PEM | A PEM file. |
Referenced by
KeyPair.formatformatformatFormatFormatKeyPairProps.formatformatformatFormatFormat