Create a Virtual Machine

Create a virtual machine in AWS Elastic Compute Cloud (EC2).

AWS documentation can be found at Launch a Linux Virtual Machine and Launching a Virtual Machine with Amazon EC2.
  1. Login in the AWS console.
  2. Click the AWS logo located in the left-hand corner of the web page.
  3. Using the search box located under AWS services, enter EC2.
  4. Click the EC2 search result.
    The EC2 dashboard is opened.
  5. Click Instances from the menu located on the left-hand side of the web page.
  6. Click Launch Instance.
  7. Click AWS Marketplace from the menu located on the left-hand side of the web page.
  8. Search and select an OS that supports cloud-init and is supported by your workload manager.
  9. Click Continue.
  10. Select an Instance Type appropriate for your site's workload based on:
    • the number of cores
    • the amount of memory
    • storage
    • network performance
    Consider the nature of the applications that you plan to deploy on the instance, the number of users that you expect to use the applications, and also how you expect the load to scale in the future. Remember to also factor in the CPU and memory resources that are necessary for the operating system.
  11. Click Next: Configure Instance Details.
  12. Enter the following to configure instance details:
    1. For Number of instances, specify 1.
    2. For Network, choose the VPC that you previously created (e.g. scaling_vpc).
      The scaling subnet is automatically populated.
    3. For Auto-assign Public IP, select Enable.
  13. Click Next: Add Storage.
  14. Specify the storage options as per your site's requirements.
    Tip: It is recommended to enable Delete on Termination to delete EBS volumes when the virtual machine is terminated.
  15. Click Next: Add Tags.
  16. Optional: You can add tags in key-value pairs for the VM per your site's requirements.
  17. Click Next: Configure Security Group.
  18. Enter the following to assign a security group to the VM:
    1. For Assign a security group, enable Select an existing security group.
    2. Select the security group that was automatically created for the cloud scaling VPC by enabling the check box next to its name.
  19. Click Review and Launch.
  20. Review the VM information of the VM and click Launch.
  21. Create a new public/private key pair for the VM by entering the following:
    1. Select Create a new key pair.
    2. Provide a name for the key pair.
    3. Click Download Key Pair.
    4. Download and save this file in a secure location.
      The information in this .pem file is used later to SSH into the VM.
  22. Click Launch Instances.
  23. Click View Instances located at the bottom of the web page.
    All virtual machines that have been created are displayed.
Your virtual machine is ready when the Instance State is equal to "running" and Status Checks are complete. The virtual machine can be accessed using its IPv4 Public IP.
Figure 1. Scaling Virtual Machine

Scaling Virtual Machine