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 :)

If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! ๐Ÿš€ #devops #90daysofdevop #AWS

ย