Jenkins on AWS

  1. From the Jenkins Credentials Provider, select AWS Credentials as the Kind.

    Choosing Kind AWS Credentials.

  2. Scroll down and enter in the IAM User programmatic access keys with permissions to launch EC2 instances and select Add.

    Adding AWS Credentials.

  3. Scroll down to select your region using the drop-down, and select Add for the EC2 Key Pair’s Private Key.

    Set Region and add Private Key.

  4. From the Jenkins Credentials Provider, select SSH Username with private key as the Kind and set the Username to ec2-user.

    Set Kind to SSH Username with private key.

  5. Scroll down and select Enter Directly under Private Key, then select Add.

    Set Private Key to Enter Directly.

  6. Open the private key pair you created in the creating a key pair step and paste in the contents from “—–BEGIN RSA PRIVATE KEY—–” to “—–END RSA PRIVATE KEY—–“.
    Select Add when completed.

    Enter Private Key.

  7. Scroll down to “Test Connection” and ensure it states “Success”.
    Select Save when done

    Test Connection.