AWS EC2 Auto Scaling : Step By Step Tutorial ( Part - 10)
ฝัง
- เผยแพร่เมื่อ 20 พ.ค. 2024
- ▬▬▬▬▬▬ 🚀 Join membership for premium content ▬▬▬▬▬▬
TH-cam Membership - / @rahulwagh
▬▬▬▬▬▬ 🚀 Courses ▬▬▬▬▬▬
1. Terraform - • HashiCorp Terraform As...
2. Ansible - • Ansible for Beginners:...
3. Prometheus & Grafana - • Getting started with P...
4. Helm Chart - • Complete Helm Chart Tu...
5. Hashi Corp vault - • HashiCorp Vault Instal...
EC2 Launch Template Tutorial: Step-by-Step Guide | How to Create & Use Existing Templates
▬▬▬▬▬▬ 🚀 How to setup the auto scaling for the EC2 ▬▬▬▬▬▬
In this comprehensive tutorial, we'll walk you through the process of setting up auto-scaling for your EC2 instances in AWS. From setting up a VPC and subnet to creating a target group and application load balancer, we've got you covered. Follow along and learn how to ensure your applications remain available and offer consistent performance, even under heavy load.
Timestamps:
0:00 - Overview of EC2 Auto Scaling
1:35 - Traditional Scaling vs EC2 Auto scaling
4:22 - Setting up VPC (Virtual Private Cloud)
5:01 - Configuring Internet Gateway
5:56 - Configuring Subnet
9:52 - Creating a Target Group
12:14 - Setting up an Application Load Balancer
16:19 - Designing and Creating a Launch Template
22:27 - Configure Auto Scaling Group
26:18 - Testing our setup
31:15 - Conclusion and Final Thoughts
Resources and Links:
Official AWS documentation on EC2 Auto Scaling - docs.aws.amazon.com/autoscali...
More on Application Load Balancers - aws.amazon.com/elasticloadbal...
Deep Dive into VPC - aws.amazon.com/vpc/
Like and Subscribe! If you found this tutorial helpful, please give it a thumbs up and subscribe for more AWS-related content. - วิทยาศาสตร์และเทคโนโลยี
#!/bin/bash
yes | sudo apt update
yes | sudo apt install apache2
echo "Server DetailsHostname: $(hostname)IP Address: $(hostname -I | cut -d" " -f1)" > /var/www/html/index.html
sudo systemctl restart apache2
I must say, this is one of the best ASG's set up tutorial out here.
Very well explained Rahul. The graphical representation really helps put things into perspective.
Crisp and clear explanation in layman's term
Hi thanks for the video, I wonder if the instances share the same volume or each one is independent, I also wonder what the estimated monthly price is for this setup
How may you plan the IP Addressing for a VPC and the related Sub-Nets?
like always the best explanation. your tutorials are really helpful
Glad you like them!
🎉 would you create a video on
deploy a small to medium scale node js api on aws for small startup with minimum cost like 25-30 usd per month.
which could increase in future.
also maybe not use load balancer to reduce cost. and use docker container. and auto scaling etc
Very good job!
Thankyou very much sir with
Simple explanation each and
Every point
You are most welcome
Where do we requested that what type of instances we want on demand or Spot instance.
excellent explanation!
Glad it was helpful!
Very detailed video, thanks!
You're welcome!
If possible can you please explain instance refresh for ASG.
Good
Excellent 🎉
Thank you! Cheers!
Thank you so much sir🙂
Most welcome
Have to put existing EC2 instances one in backend and frontend in auto scaling group is it possible ? Do i have to create new instance and do all installation part
Yes it is possible to do that
very nice sir..👌👌
Keep watching
@rahul thank you for sharing knowledge, I tried this same to same setup but my instances are not getting public IPs and hence none of the instances gets healthy in Target Group. please advice If I am missing anything.
Public IPs has nothing to do with the health of ec2 please check the instance user data script if that has been running properly or not
nice explanation
Keep watching
Auto scaling support which type of scaling policy it's vertical or horizontal scaling?
It is an horizontal scaling because we are increasing and decreasing the number of instances
why it show 502 bad gateway when i hit load balancer DNS
what was the use of min and max . When will no of instances reach maximum or minimum
I had the same question so I investigated, AWS will try to keep the number of instances near of the desired number, if the metric is reached then the number of EC2 instances increases and the same happens if the demand is very low, the number of instances will decrease but always above the min number
What case we use load balancer and Autoscaling?
Load balancer will not scale up or scale down instances but instead it will just distribute the traffic equally but autoscalling will increase and decrease the instances
How did you make that architecture diagram please explain
I keep the things simple and use power point for architectural diagrams
Hi thank you for the awesome explanation. Is it possible to create autoscaling group instances in private subnet?
Yes it is possible in the private subnet as well
@@RahulWagh ohh ok... so in that case do I need to have NAT gateway for that or I can connect private subnet via load balancer?
@@khopithansathiyakeerthy4598 you first need a target group and then loadbalancer after that you should be able to connect
@@RahulWagh Thank you
@@RahulWagh Hi, I created two private subnets(AZ1a, AZ1b) and associated them with a new private route table. There is no IGW or NAT GW connected with that. Then I created a Target group. Then I configured a Load balancer with public subnets in two different Availability zones(AZ1a, AZ1b). After that, I created Auto Scaling group with two private subnets. But the the health check is failed and instances are being destroyed and recreated again and again. So, what would be the reason for this
I want to know if suddnly high traffic come how to resolve this issues?
You have a max count always with you which you can set to high but use scaling based on memory usage as well as cpu to have more control
Hi Rahul, Can I know the information about membership, If I join the membership of any (beginner/intermediate), Have you uploaded concept videos there and Do I see that videos? Thanking you.
Not yet there are sessions which includes terraform and aws but in future i am planning to upload more topics
Thanks for information@@RahulWagh
Hello sir ,
Ur videos r amazing.
But try to show how to delete this all .
Nice session. Please let me know how to get the Channel membership
Check the description section or you can click on this link - th-cam.com/channels/7p4oXcPbgk_yTSHK7QlkSg.htmljoin
Hii
I am getting 502 Bad gatewayError whats might be the reason
There could multiple issues for example security group, target group mapping ec2 instance subnet. Check everything one by one
Can you please start terraform to provision these all activities....
Hi Manoj i have stated terraform series to provision all the things which i have shown in this tutorial but it only for the youtube members. If you are interested then you can join my membership program. Here is the playlist for that - th-cam.com/play/UUMO7p4oXcPbgk_yTSHK7QlkSg.html
You can join also with - th-cam.com/channels/7p4oXcPbgk_yTSHK7QlkSg.htmljoin
my health status was unhealthy any reason ?
Please create a tutorial for "deployment of a dockerized app via CICD, AWS Code deploy and ECR"
Surely I will add to my list
can anybody copy paste the user data script which is used by him?
#!/bin/bash
yes | sudo apt update
yes | sudo apt install apache2
echo "Server DetailsHostname: $(hostname)IP Address: $(hostname -I | cut -d" " -f1)" > /var/www/html/index.html
sudo systemctl restart apache2
your expiation is very good, but when you uploaded a videos in series, why are you showing the repeated process(vpc, ec2, routes, lb) every time?. If we you can save that time you can upload small videos and cover all the buttons. Sorry it's just my feedback.
I appreciate you feedback and it is valid. But I have thousands of viewers who are only interested in one topic and if i skip the networking part in any of my video then they will not understand why i am working private or public subnet or why i created the VPC in the first place.
So that is the reason i try to always prepare the setup from the scratch although it might be repeated for you but to improve that experience i have provided the time stamp in the description so that you can skip the networking part which you feel repeated
google owner teaching on aws
Hahaha no I am Rahul
Great job!
Thanks for the visit