Day 47 Task: Test Knowledge on aws

Day 47 Task: Test Knowledge on aws

ยท

2 min read

๐Ÿ”ถ Task-01: Monitor the EC2 instance using Amazon CloudWatch and troubleshoot any issues that arise.

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

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

      sudo apt-get install apache2 -y
      #To check apache2 status
      sudo systemctl status apache2
    

  • Monitor the EC2 instance using Amazon CloudWatch and troubleshoot any issues that arise.
    Goto Cloud watch > alarms > create alarm and select metric CPU Utilization.

    Specify metrics and conditions

    Conditions Define the threshold value 40.

Configure actions Notification.

Add name and description

Created Alarm


๐Ÿ”ถ Task-02: Create an Auto Scaling group using the AWS Management Console and configure it to launch EC2 instances in response to changes in demand.

  • First, create a launch template from your ec2 instances

    Now create an auto-scaling group.

    Select Launch template

    Select VPC and Availability Zones and subnets.

    Configure advanced options to make it as default.

    Configure group size and scaling policies

    Created Auto scaling group.

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

  • 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.

    To check the instances.
    Install aws cli by using sudo apt aws install awscli -y and configure aws by suing aws configure

    aws ec2 describe-instances

To check the state of the auto-scaling group.
aws autoscaling describe-auto-scaling-groups


Happy Learning :)

Stay in the loop with my latest insights and articles on cloud โ˜๏ธ and DevOps โ™พ๏ธ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).

Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.

#Git #Linux Devops #Devopscommunity #90daysofdevopschallenge #python #docker #Jenkins #Kubernetes

Did you find this article valuable?

Support Chandresh Patle's Blog by becoming a sponsor. Any amount is appreciated!

ย