Day 47: Test Knowledge on aws ๐Ÿ’ป ๐Ÿ“ˆ

Day 47: Test Knowledge on aws ๐Ÿ’ป ๐Ÿ“ˆ

ยท

3 min read

This is #90DaysofDevopschallenge under the guidance of Shubham Londhe sir.

Introduction

Today, as part of the 90 Days of DevOps Challenge, we're diving into testing our knowledge of AWS services. Let's roll up our sleeves and get technical!

Task-01: Launching and Monitoring an EC2 Instance

1. Launch an EC2 Instance:

  • AWS Management Console:

    • Sign in to the AWS Management Console.

    • Navigate to the EC2 service.

    • Click "Launch Instance."

    • Choose an Amazon Machine Image (AMI), instance type, configure instance details, add storage, configure security groups, and review.

    • Launch the instance and select an existing or create a new key pair for SSH.

  • SSH Connection:

    • Use your terminal to connect to the instance using SSH.

    • Example: ssh -i your-key.pem ec2-user@your-instance-ip

2. Install a Web Server:

  • Update and Install Apache (Example for Ubuntu Linux):

      sudo apt update -y
      sudo apt install apache2 -y
    

  • Deploy a Simple Web Application:

    • Create a basic HTML file or deploy a sample application.

    • Example index.html:

    <html>
      <head>
        <title>My AWS Web App</title>
      </head>
      <body>
        <h1>Hello, AWS!</h1>
      </body>
    </html>

  • Place it in the document root (usually /var/www/html/).

3. Monitor with CloudWatch:

  • AWS Management Console:

    • In the EC2 dashboard, select your instance.

    • Under the "Monitoring" tab, view basic metrics.

    • For detailed monitoring, navigate to CloudWatch.

  • CloudWatch Monitoring:

    • In CloudWatch, go to "Alarms" and create alarms for metrics like CPU utilization.

    • Set up email notifications for alarms.

Task-02: Configuring Auto Scaling

1. Create an Auto Scaling Group:

  • AWS Management Console:

    • In the EC2 dashboard, under "Auto Scaling Groups," create a new group.

    • Configure the launch configuration, set scaling policies, and define desired capacity.

  • Auto Scaling Configuration:

    • Specify minimum and maximum instances.

    • Configure scaling policies based on metrics (e.g., CPU utilization).

2. Monitor with CloudWatch:

  • AWS Management Console:

    • In the EC2 dashboard, under "Auto Scaling Groups," select your group.

    • View the "Activity" tab for scaling events.

    • Go to CloudWatch to monitor metrics related to your Auto Scaling group.

3. AWS CLI Verification:

  • AWS CLI Commands:

    • Install the AWS CLI if not already installed.

    • Use commands like:

    aws autoscaling describe-auto-scaling-groups
    aws ec2 describe-instances

  • Verify that the correct number of instances are running.

By following these steps, you've successfully launched and monitored an EC2 instance, installed a web server, and configured Auto Scaling with CloudWatch monitoring. This hands-on experience enhances your practical understanding of AWS services. Feel free to explore more configurations and adapt based on your specific use cases! ๐Ÿš€

๐Ÿ’ก
Feel free to drop any questions ๐Ÿค” or requests for help in the comments section! I would be happy to answer them!
๐Ÿ’ก
If you found this information helpful, a thumbs up๐Ÿ‘ and a follow would be greatly appreciated! Your support means the world to me.

Thank you for taking the time to read! ๐Ÿ’š

Did you find this article valuable?

Support Akash Dhengale by becoming a sponsor. Any amount is appreciated!

ย