2. Provision target EC2 Instances

In this step, we will be creating 2 Amazon EC2 instances that will be the target of our automation. As we will use these instances to demonstrate the automation, the instances can be of any type or use any OS.

  1. From the AWS Management Console, navigate to the N. Virginia (us-east-1) region.

  2. Navigate to the EC2 console by clicking on the Find Services search bar, typing EC2 in the search bar, and pressing Enter.

    Open EC2 console

  3. Click on Launch Instance, you can select any instance type or OS, but here are our reccomended options:

    1. On Step 1: Select the first option Amazon Linux 2 AMI (HVM)
    2. On Step 2: Keep the default option of t2.micro, click on Next: Configure Instance Details
    3. On Step 3: Change the number of Number of Instances from 1 to 2, click on Review and Launch
    4. On Step 7: Click on Launch
    5. On the “Select an existing key pair or create a new key pair” dialog select “Proceed without a key pair” as we won’t be logging in these instances. Acknowledge the warning and press Launch Instances
    6. Click on View Instances
  4. From the instance overview page find the newly created instances and apply the following tags:

    • Instance 1: Key=Stage; Value=Dev, signifying a non-Production EC2 instance.
    • Instance 2: Key=Stage; Value=Prod, signifying a Production EC2 instance.
  5. Write down your newly created instance ids, you will need these for later steps.