DevOps(Day-47): Test Knowledge on AWS๐Ÿ’ป ๐Ÿ“ˆ

DevOps(Day-47): Test Knowledge on AWS๐Ÿ’ป ๐Ÿ“ˆ

ยท

3 min read

Task-1: Monitoring a WebApp through AWS CloudWatch

  • Launch an EC2 instance using the AWS Management Console and connect to it using SSH.

    1. Create an EC2 instance as we have seen in our previous blogs.

    2. Login to the EC2 instance via SSH through Command Prompt.

  • Install a web server on the EC2 instance and deploy a simple web application.

    1. Install the Apache web server on the EC2 instance.

       sudo apt install apache2
      

    2. Deploy a simple website on the Apache web server.

    3. Now the Site is up and running.

  • Monitor the EC2 instance using Amazon CloudWatch and troubleshoot any issues that arise.

    1. You can navigate to the monitoring section in the EC2 instance to view the usage of resources in EC2 by a Graphical view.

    2. Create a dashboard with the choice of resource utilization you want to view.

    3. This will navigate to CloudWatch to create a dashboard.

    4. You can select the appropriate details to view the usage.

    5. We can also create a Cloud Watch alarm that will trigger in case of over utilization.

    6. Select the Pre-instance metrics to set the resource utilization in EC2.

    7. Create the Alarm that will come as E-mail alert.

    8. Now, the Alarm is created and alerts will be triggered in case of over utilization of resources.

Task-2: Monitoring an Auto Scaling group through AWS CloudWatch

  • Create an Auto Scaling group using the AWS Management Console and configure it to launch EC2 instances in response to changes in demand.

    1. Navigate to Autoscaling group of EC2.

    2. A template of EC2 is required to create an auto-scaling group.

    3. Navigate to the created instance and create a template.

    4. Select the appropriate configurations you want to change and create launch template.

    5. Now, navigate to the auto scaling group to provide the information about the launched template.

    6. Choose the same VPC and Subnet where the EC2 lies.

    7. Now create the auto-scaling group.

    8. The Auto-scaling group is now created.

  • Use Amazon CloudWatch to monitor the performance of the Auto Scaling group and the EC2 instances and troubleshoot any issues that arise.

    1. You can navigate to the Monitoring section to view the graphical presentation of the utilization.

    2. You can add the same to the already created dashboard in AWS CloudWatch.

    3. Same can be setup to trigger an e-mail by setting a CloudWatch alarm.

  • Use the AWS CLI to view the state of the Auto Scaling group and the EC2 instances and verify that the correct number of instances are running.

    1. Install the AWS CLI on the instance.

    2. You can verify the running Auto-scaling group with the AWS CLI command.

    3. Also running EC2 instances can be verified.

Thanks for reading my article. Have a nice day.

You can follow me on LinkedIn for my daily updates:- linkedin.com/in/bandan-kumar-sahoo-131412203

Thanks,

Bandan

ย