EC2 instance Autoscaling

Search for a command to run...

No comments yet. Be the first to comment.
"ddrescue got your data off the dying drive. Now what? This is where you actually get it back." š The Big Picture First A lot of people think ddrescue restores data. It doesn't ā not directly. Here
"Your hard drive is making a clicking sound. Your stomach drops. Don't panic ā ddrescue has your back." š¤ What Even Is ddrescue? Imagine your hard drive is a library. Some books are fine. Some are
Most teams treat SELinux as an obstacle. The teams that thrive in production treat it as a superpower. Here's everything you need to know to move from frustrated to fluent. If you've ever Googled a
Application Load Balancer? A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, such as EC2 instances, in multiple Availability Zones. This increases th...

In this Lab you will get the idea of the following:
Created an Amazon EC2 launch template
Created an Amazon EC2 Auto Scaling launch configuration
Configured scaling policies and created auto Scaling group to scale in and scale out the number of servers based on variable load

VPC with subnet 10.0.0.0/16
For Availability Zone 1
public subnet: 10.0.0.0/24
private subnet: 10.0.1.0/24
For Availability Zone 2
public subnet: 10.0.2.0/24
private subnet: 10.0.3.0/24
Security Group
[ Visit my previous blogs for Creating VPC and Security group if you had problem ]
Basic configuration
Load balancer name: WebELB
Select VPC: myVPC
Mappings: Select at least two AG so select both public subnets of different AG
Security groups
Listener and routing
Protocol: HTTP Port: 80
Create target group as:
Target group name: web-app
VPC: myVPC
Next
Register the targets session leave it as default and
Create target group
-Go back to the load balancer tab, refresh, and select the target group that you created
In the EC2 left bar there is an instances section in which Launch Templates also select and create launch templates as:
Launch template name: webtemp
Template version description: For autoscaling use
Select Provide guidance to help me set up a template that I can use with EC2 Auto Scaling
Application and OS Images: select My AMIs and leave the default option
Instance type: t3.micro or other free tiers if exits
Key pait(login)-> Key pair name: don't include in the launch template
Network Settings-> Subnet: Don't include in launch template Firewall(security group): Select the existing security group and select that you created for HTTP access
Leave all defaults and Create launch template
Choose the Launch template that we created and From Action dropdown select Create Auto Scaling group
Name ->
Auto Scaling group name: Web Auto Scaling Group
All Default and Next
Network ->
VPC: myVPC
Availability Zones and subnets: Select both private subnets
Choose Next
Load balancing ->
Select Attach to an existing load balancer
web-app that you createdHealth checks:- Select Turn on Elastic Load Balancing health checks
Choose Next
Configure group Size and scaling policies - optional
-> Group size - optional
Desired capacity: 2
Minimum capacity: 2
Maximum capacity: 4
-> Scaling policies - optional
Select Target tracking scaling policy
Metric type: choose Average CPU utilization
Target value: 50
Choose Next
Add notifications - optional
NextAdd tags - optional
WebAppReview and Create Auto Scaling group
Select instances and you see there are 2 WebApp named instances are automatically created
Select Target Groups and select that you created above and observe health status -> healthy