Blog

Getting Started with AWS - Create a new EC2 KeyPair

Posted by Jeremy Goodrum

When a new instance is launched, the password for the root or administrator accounts of EC2 instances will be randomly generated. The only way to get this password is to have access to the associated private key file called an EC2 KeyPair. In this article, we will explain how to pre-create an EC2 KeyPair.

Let’s begin!

AWS Tip

Note: It is important to securely store your KeyPair files. If you delete or misplace your PEM file, you will not be able to log into your EC2 instance.

  1. Log into EC2 KeyPair portion of the AWS Console (Note: KeyPairs are region specific so select the correct region location)
  2. Select Create KeyPair
  3. Enter a new name for the KeyPair
  4. The KeyPair will be downloaded automatically

Once you have downloaded the KeyPair, save it in a location that you will remember. This is the only time that you can save the file. Anytime that you launch a new EC2 instance, you can select to use this existing EC2 KeyPair instead of creating one for every launch.

-