Skip to main content

Key Pair

A key pair in Amazon EC2 allows you to securely connect to your instances. It consists of a public key and a private key, the former of which is stored by AWS, and the latter by the user. Key pairs are instrumental in establishing secure SSH connections to EC2 instances, ensuring only authorised users can gain shell access. You can manage your key pairs using the AWS Management Console, AWS CLI, or AWS SDKs. For further information, visit the official AWS documentation on key pairs.

Terraform Mappings:

  • aws_key_pair.id

Supported Methods​

  • GET: Get a key pair by name
  • LIST: List all key pairs
  • SEARCH: Search for key pairs by ARN