AWS CloudFormation
User Guide (API Version 2010-05-15)

Creating an EC2 Key Pair

The use of some AWS CloudFormation resources and templates will require you to specify an Amazon EC2 key pair for authentication, such as when you are configuring SSH access to your instances.

Amazon EC2 key pairs can be created with the AWS Management Console by using the following procedure.

To create an EC2 key pair

  1. In the AWS Management Console, switch from the AWS CloudFormation console to the Amazon EC2 console by clicking the Services button in the top-left corner of the screen, and select EC2.

    The console display now shows the Amazon EC2 console dashboard.

  2. In the Amazon EC2 console, in the Navigation pane, click Key Pairs.

    You see the Key Pairs page, displaying your Amazon EC2 key pairs. If you haven't created any yet, the list is empty, and instead shows the Create Key Pair button.

  3. Click the Create Key Pair button.

  4. Type a key pair name, and click Create. It doesn't matter what you name it, but make it something you can easily remember.

    The key pair is created, and the download of your private key begins. It will be called name.pem, where name represents the name you gave to your key pair.

  5. Download the key pair, and set the permissions to 400 (on a Linux or Mac OS system).