Amazon Auto Scaling Challenge

Prerequisites

  1. Good knowledge of AWS services
    • Amazon EC2
    • Amazon EC2 Auto Scaling
    • Elastic Load Balancing
  2. Laptop
  3. Internet Browser
  4. Internet connection

Challenge Instructions

  1. Region : Make sure to use us-east-1 region to create all the resources.
  2. You will be provided with the requirements of the challenge. If you are new to AWS Cloud, we recommend you go through our hands-on Labs before taking this challenge.
  3. Challenge Duration: 90 minutes

How to submit the challenge

  1. After building the infrastructure, click on Validate button, to validate if you have built the required infrastructure and completed the challenge successfully.
  2. Validation status
    • Success - You have completed the challenge successfully.
    • Failed - You have failed to complete the challenge.
  3. Once you have successfully validated the challenge, click on End Lab.

Cloud Challenge Details

Your company is considering migrating a web application from an on-premise server to Amazon Elastic Compute Cloud (EC2). You have been tasked with setting up example infrastructure for hosting the web application and testing the scaling activity with Auto Scaling Group policies.

In this lab challenge, you will use the AWS Management Console to complete the tasks that result in provisioning infrastructure to fulfill your company's requirements.

Follow the instructions given below to work on the challenge.

  1. Create an Amazon VPC Security Group allowing HTTP & SSH traffic.

    • Allows the Inbound rules - 80 & 22.

    • Allows traffic from any IP address.

  2. Create an ELB Target Group.

    • Use target type as Instance.

    • VPC as default

    • Uses the HTTP protocol and port 80.

    • Do not register any targets.

    • Leave the options as default, if not specified.

  3. Create an Application Load Balancer.

    • Scheme is internet-facing.

    • us-east-1a and us-east-1b availability zones.

    • Use the created Security Group.

    • Has a listener using the HTTP protocol on port 80

    • Routes traffic to your target group.

    • Do not register any targets.

    • Leave the options as default, if not specified.

  4. Create an Amazon EC2 Auto Scaling Launch Template.

    • With Amazon Linux 2 AMI and 64-bit (x86) architecture.

    • With the t2.micro instance type.

    • New Key pair.

    • Use the created Security Group.

    • Specify the User data script provided below in the Resources section.

    • Leave the options as default, if not specified.

  5. Create an Amazon EC2 Auto Scaling Group.

    • Use your launch template.

    • Has Min capacity and Desired capacity set to two (2)

    • Has Max capacity set to three (3).

    • Scaling policy -

      • Metric type - Avg CPU Utilization

      • Target value - 20

      • Instance needs - 60 sec warmup

    • VPC as default.

    • us-east-1a and us-east-1b availability zones.

    • Use your target group

  6. Test the traffic shifting with ELB DNS name.

  7. SSH into the EC2 Instance and install stress and increase the system load with the commands provided in the Resources section.

    • Commands are provided below in the Resources section.

    • Monitor the CPU Utilization graph of the Instance.

  8. Test the Scaling Activity in the AWS Management Console.

  9. Click on Validate to complete the challenge.