Test Knowledge on AWS
3 min read
Task-01
Launch an EC2 instance using the AWS Management Console and connect to it using SSH.
Step1: connect to EC2 instance through SSH
Install a web server on the EC2 instance and deploy a simple web application.
Step2: install apache2 Server on the Ubuntu instance
sudo apt updata sudo apt install apache2
Monitor the EC2 instance using Amazon CloudWatch and troubleshoot any issues that arise.
Step3: Go to Cloudwatch or click on action then monitor and troubleshoot
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.
Log in to the AWS Management Console (https://console.aws.amazon.com/).
Navigate to the Amazon EC2 service by selecting it from the list of services.
In the EC2 Dashboard, click on "Auto Scaling Groups" in the left navigation pane.
Click on the "Create Auto Scaling group" button.
Choose the launch template or create a new launch template. A launch template defines the configuration for the EC2 instances launched by the Auto Scaling group. If you haven't created a launch template, you can click on the "Create launch template" button to configure one.
In the "Configure Auto Scaling group details" section, provide the following information:
Auto Scaling group name: Enter a name for your Auto Scaling group.
Group size: Set the desired capacity, minimum size, and maximum size for your group.
Network: Choose the VPC and subnets where your EC2 instances will be launched.
Load balancing: Select any load balancers to distribute traffic across instances (optional).
Health checks: Configure health checks to monitor the instances' health (optional).
Scaling policies: Choose the scaling policies to adjust the number of instances based on demand.
In the "Configure scaling policies" section, select the scaling policies you want to use. You can choose from various options such as target tracking scaling, step scaling, or simple scaling. Configure the policies based on your requirements.
In the "Add notifications" section, you can optionally add notifications for Auto Scaling events such as launching instances, terminating instances, etc.
Review the configuration details in the "Review" section, and make sure everything is set up as desired.
Click on the "Create Auto Scaling group" button to create the 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.
aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names <your-auto-scaling-group-name> #to check auto scaling group in AWS CLI
NOTE: Auto Scaling group manages the instances and create a new instance if it is deleted. just delete it if not required.
Happy Learning!!