Yes, you can.
When a Load Balancer detects an unhealthy instance, it simply stops sending traffic to the instance. It does not terminate the instance.
When Auto Scaling detects an unhealthy instance, it terminates the instance and automatically replaces it to maintain the Desired Capacity. However, the default health checks performed by Auto Scaling only look at the underlying health of the virtual machine -- it is not able to check the health of applications.
Fortunately, you can combine health checks between Load Balancing and Auto Scaling. This way, if the Load Balancer detects an unhealthy application, Auto Scaling can terminate and replace the instance.
Be careful! If the health checks are incorrectly configured, it may cause thrashing (continually adding and removing instances). For example, if an insufficient warmup period has been specified, Auto Scaling might terminate an instance before it is fully ready.
See documentation Health Checks for Auto Scaling Instances:
If you have attached a load balancer to your Auto Scaling group, you can optionally have Auto Scaling include the results of Elastic Load Balancing health checks when determining the health status of an instance.
Note:
- When using a Classic Load Balancer, Auto Scaling uses the health check from the Load Balancer
- When using an Application Load Balancer, Auto Scaling uses the health check from the Target Group
The Application Load Balancer will not appear in the "Load Balancer" list within the Auto Scaling group configuration. Instead, select the appropriate Target Group.