In the following sections, we'll see how to generate an SSH key pair to connect to your EC2 instances, and also install the puppetlabs/aws
module with its dependencies.
You'll need an SSH key pair in order to connect to any EC2 instances you create. We will generate and download your key pair in this section:
In the AWS console, go to the EC2 section and select Key pairs in Network & Security in the left pane.
Click the Create Key Pair button:
You will be prompted for the name of your key pair. Enter
pbg
for this example.A file named
pbg.pem
will be automatically downloaded by your browser. Move this file to your~/.ss
h directory on your own computer (or copy it to thevagrant
user's~/.ssh
directory on the Vagrant VM if you'd rather access your AWS instances from there).Set the correct permissions on the key file with the following command:
chmod 600 ~/.ssh/pbg.pem