Bobcares Logo
Search Phone User Profile Emergency Contact
Bobcares Logo
Search Phone User Profile Emergency Contact
Emergency Contact Client Portal
SOLUTIONS
Product Engineering
MVP Build
MVP to Scale
Product Maintenance
Digital Transformation
Process Digitization & Automation
Systems Integration & Workflow Orchestration
Data Enablement & Decision Support
Application & Platform Modernization
Transformation Execution
AI Services
AI Readiness & Use-Case Discovery
AI Integration & Application Enablement
Intelligent Automation & AI Workflows
Infrastructure Management & Optimization
Always-On Infrastructure Management
Proactive Monitoring & Incident Prevention
Cloud Cost Control & Optimization (FinOps)
Outsourced IT & End-User Support
Managed Infrastructure Execution Support
DevOps & Automation Services
CI/CD & Release Automation
Infrastructure as Code & Platform Standardization
Reliability Engineering & Observability
DevSecOps Enablement
Cybersecurity
Security Assessment & Risk Posture
Threat Monitoring & Incident Response
Infrastructure & Cloud Security Hardening
Vulnerability Assessment & Penetration Testing (VAPT)
Backup, Disaster Recovery & BCP

Replace unhealthy EC2 instances in Elastic Beanstalk

by Jiji Jose | Aug 29, 2021 | Amazon Web Services (AWS), Latest | 0 comments

Please Note: This article is part of our historical archive. Because it was published a while ago, some of the information, links, or context may now be outdated.

Wondering how to replace unhealthy EC2 instances in Elastic Beanstalk? We can help you with this!

As a part of our AWS Support Services, we often receive similar requests from our AWS customers.

Today, let’s see the steps followed by our Support Techs to help our customers to replace unhealthy EC2 instances in AWS Elastic Beanstalk.

 

Replace unhealthy EC2 instances in Elastic Beanstalk

 
The Elastic Beanstalk environment’s Auto Scaling group health check configuration is set to the EC2 type which simply performs a status check of EC2 instance by default.

We can use a configuration file to automate the replacement of unhealthy EC2 instances. That is we must change the health check type of the environment’s auto-scaling group from EC2 to ELB by using a .ebextension if we want to automate the replacement of unhealthy EC2 instances.

Now let’s see the steps for changing the health check type of your instance’s Auto Scaling group to ELB by using the configuration file.
 

Change the health check type of your instance’s Auto Scaling group to ELB

 

  1. Firstly, In the root directory of our source bundle, we need to create a folder named .ebextensions.

2. Then we need to create a new .config file. For example:

Example .ebextensions/autoscaling.config
===============================================
Resources:
AWSEBAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
HealthCheckType: ELB
HealthCheckGracePeriod: 300
===============================================

HealthCheckGracePeriod is the time that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that’s come into service.

3. Now create a zip file for our updated application source bundle, and then we need to deploy your application.

Note that we can also deploy your application using eb deploy.

Also, note that the above steps apply to environments with load balancers only.

Confirm that the health check type of Auto Scaling group is set to ELB

  1. Log in to the AWS Management console and then open the Amazon EC2 console.

2. Select Auto Scaling Groups.

3.  Then enter the environment ID of your Auto Scaling group for Filter and then select our Auto Scaling group.

4. Then we need to confirm that the Health Check Type is set to ELB on the Details tab of our Auto Scaling group.

Note the following points:

  • The status checks do not cover the health of our application, server, or any docker containers running on the instance. It covers only an EC2 instance’s health.
  • The load balancer removes the unhealthy instances from its target when the application crashes. However, the Autoscaling group won’t replace that unhealthy instance.
  • We enable the Auto Scaling group to automatically replace the unhealthy instances by changing the health check type from EC2 to ELB. When the health check fails for an instance, it will replace that unhealthy instance.

[Need help with more AWS queries? We’d be happy to assist]

 

Conclusion

 
To sum up, today we discussed the steps followed by our Support Engineers to help our customers to replace unhealthy EC2 instances in Elastic Beanstalk.

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Windows Server Migration Guide: Upgrade Paths, Licensing, and Minimal Downtime
  • Secure Your CI/CD Pipeline With DevSecOps
  • Server Hardening Checklist for Linux & Windows in 2026
  • Outsourced vs In-House IT Infrastructure Management: Cost, Risk & Scalability in 2026
  • Cloud Modernization Services: A 7-Step Approach to Modern IT

Categories

  • Advanced Vulnerability
  • AI Automation
  • AI Services
  • AI Support
  • AIOps
  • Amazon Web Services (AWS)
  • Apache
  • API Integration
  • Application Development
  • Azure
  • Business Process Management
  • Business Process Reengineering
  • Cloud Cost Optimization
  • Cloud Management
  • Cloud Modernization
  • Cloud-Native Application
  • Cloudflare
  • cPanel
  • cPanel migration
  • Cyberpanel
  • DDoS
  • Development Service
  • DevOps
  • DevOps Consulting
  • DevSecOps
  • Digital Transformation
  • DigitalOcean
  • DirectAdmin
  • Docker
  • Drupal
  • Ecommerce
  • Feedback Management Systems
  • Filezilla
  • FTP
  • Full-Stack Product Development
  • Google cloud platform
  • HAProxy
  • Headless CMS Integration
  • Hosting Support
  • Hybrid Cloud Management
  • IIS
  • Infrastructure Management & Optimization
  • Kubernetes
  • KVM
  • Laravel
  • Latest
  • Legacy Application Modernization
  • Linode
  • Litespeed
  • LXC/LXD
  • Magento
  • Managed cloud services
  • Managed IT Services
  • Microservices Architecture
  • Mobile App Development
  • MongoDB
  • Moodle
  • MySQL
  • NFS
  • Nginx
  • OnApp
  • Outsourced Support
  • OVH
  • ovirt
  • Performance Optimization & Monitoring
  • pfsense
  • Plesk
  • PostgreSQL
  • PowerDNS
  • Product Engineering
  • Proxmox
  • RedHat
  • Redis
  • SaaS Development
  • Sendmail
  • Server Administration
  • Server Management
  • Software Development
  • Software Testing
  • SQLServer
  • Technical Support
  • UI/UX
  • Virtualizor
  • VMware
  • VPN
  • Vulnerability Scanning
  • Vultr
  • Web Development
  • Windows
  • WordPress
  • WordPress Hosting
  • WordPressHA

Subscribe to our newsletter

Footer newsletter

Email inquiry@bobcares.com | Phone 1-800-383-5193

Solutions

  • Product Engineering
  • Digital Transformation
  • AI Services
  • Infrastructure Management & Optimization
  • DevOps & Automation Services
  • Cybersecurity

Services

  • Managed IT Services
  • Cloud Modernization Services
  • Custom Software Development Services
  • DevOps services
  • Business Process Management Services

Insights

  • Case Studies
  • Blog

Company

  • About Us
  • Our Partners
  • Careers
  • CSR
Product Engineering +
Web Development MVP to Scale Builds Microservices Architecture Agile & Dev Team Augmentation Mobile Apps Ecommerce UI/UX Design QA & Test Automation
Digital Transformation +
Legacy Modernization Workflow Automation Data-Driven Dashboards CRM / ERP Integration Business Process Re-engineering
AI Services +
AI & Machine Learning AIOps Intelligent Automation Business Intelligence & Analytics AI Installation & Compute
Infrastructure Management +
Cloud Setup Cloud Migration Managed Cloud Services Server & Hosting Cost Optimization Performance Optimization Outsourced Support
DevOps & Automation Services +
CI/CD Setup Kubernetes & Docker Infrastructure as Code Cloud-Native Migration DevSecOps
Cybersecurity & Compliance Services +
Security Hardening VAPT Incident Response Backup & DR

© 2026 Bobcares. All Rights Reserved.

  • Cookie Policy
  • |
  • GDPR
  • |
  • Privacy Policy
  • |
  • Terms of Service
  • LinkedIn
  • YouTube
  • Instagram
  • Facebook

Preview of the new Bobcares experience
NEW UPDATE
See What’s New
at Bobcares

Discover a faster, clearer view of our services and expertise.


Explore the New Experience
Arrow Right