# Day 44 : Implementing Auto Scaling for High Availability in AWS

Welcome to Day 44. Today, we will learn how to implement auto scaling for high availability in AWS. In this lab, you need to create a launch template named **datacenter-launch-template**, define a User Data script, create an Auto Scaling Group named **datacenter-asg**, create a target group named **datacenter-tg**, and create an Application Load Balancer named **datacenter-alb**. In this lab, you can't use the t2.micro instance type because it is no longer supported for Amazon Linux 2 AMI. So, I used the t3.micro instance type instead.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687024553/0791465c-5a24-45b6-83fc-300bd5692eb8.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687080530/f3d21ec4-2b70-4618-95e4-ba6910a1a504.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687127149/cb42892e-6e9f-4c4b-aeff-122d2fcb3276.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687158567/81e58880-1c54-47bb-aaa6-d4e6f4d472fb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687206408/48574d73-5b15-4a9d-80ae-ab72598a4658.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767688863434/be01f6cc-7807-4e1f-80c0-a1804bafec60.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767688884154/bcc7df36-6bae-41a7-89fe-7777d84f5cd9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687576670/6372ad42-8a96-430f-911f-3db5d4a5ad97.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767688957115/d10e2396-dee7-4058-aee7-50ef30fa5e9e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767688353427/f082d085-6981-4cf6-9a8e-bb5994dd624d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689909418/d3157eaa-966e-4aaa-80ad-444eb042d0d0.png align="center")

```bash
#!/bin/bash
sudo yum update -y

sudo amazon-linux-extras install nginx1 -y

sudo systemctl start nginx

sudo systemctl enable nginx
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687897094/a1d424b8-e618-4819-975b-4c032ecdd144.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687939223/a8d03103-cd2a-4681-9298-726eaa5439af.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687967814/131d2950-4e49-4a4c-bbe3-ee77e0611055.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767687983504/3b379330-40b0-4712-9f68-53364e78befa.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767688015296/88c83d4d-1694-4b87-8a2f-fb825cbff75f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689144066/9e379205-c678-4bbf-9699-6a0775e96f6b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689160765/b6276e08-92ae-4c5b-90b9-0be97f606d55.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689176245/8e5eb4d7-f382-4111-a1d0-983848aa91dc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689199358/1a086aa8-6e49-421b-bb0d-6e53dffec097.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689236088/af9b38e6-68d0-4a3c-a8f9-9f26baba57cf.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689250504/08930bec-e864-4298-b871-d7d8e0d22392.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689263596/3a5b5cb7-5740-4f28-93f1-07ad4dc8296b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689282871/c09b2ec9-2b88-4d22-8446-1c02f452d1da.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689294920/64df8766-78a7-4e9f-a573-37b14c8a5ecd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689324264/aeca75f2-b2ef-4345-9ea3-8e886eaa1fa5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689353436/77e47ba4-ff34-4b17-9681-bf63c78666cf.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689392317/ad8eb534-38bf-42bf-b6c7-5d6e15165c9d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689409224/2fbb375f-6559-4e61-a3fb-12d3db0f31dc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689424429/67243f5b-beb3-4cd8-b198-9f2c195ebd48.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689463055/d7827445-bff3-45ef-a68a-7bbd30db228c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689479391/07cc26e8-628f-47d6-89fe-b8a37e44cc8f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689546828/f4a88ebf-cc0b-44a8-942e-fd8d3ec1aa52.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689736882/5bff6d7f-6c40-43c2-877f-41426c4052a5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689768752/d81ffef8-5543-454a-bc16-9098a90e0315.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689788133/ce867893-9eb0-45a6-a132-d54196c35216.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689823769/6f04772d-3ca4-48ce-a8dd-2fcdd2ac3368.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767689840788/10e96cc3-d709-421a-aed3-7bda698d4deb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767690008953/e86351e6-7f85-44a7-bf05-661adc723723.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767690020400/ce220c15-4387-4ca8-a166-2116c22aa4aa.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767690037990/3d0732ff-e84a-425a-86ed-c4342ff67563.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767690058760/56e7d226-7225-4c46-af8a-0e4da1865c71.png align="center")

Congratulations you did it. It looks good. This lab was successfully completed without any errors. See you in day 45. If you have any issues please let me know I will be happy to assist you. Stay tuned and learn together. If you find my article useful, please kindly like and share it.
