--- id: django-ebhealthcheck version: "2.0.2" license: BSD license_treatment: permissive maintenance: dormant --- # django-ebhealthcheck — Django app to add an instance's public IP to ALLOWED_HOSTS for Elastic Beanstalk's health check system License: permissive · Maintenance: dormant · Downloads: 80.2K/mo ## What it is and what it does django-ebhealthcheck is a Django application that solves a specific problem with AWS Elastic Beanstalk's health check system. When Elastic Beanstalk performs health checks on load-balanced instances, it uses the instance's public IP as the request's host header. By default, Django rejects requests with unrecognized host headers and returns a 400 Bad Request error, causing health checks to fail. This package intercepts that flow at application startup and dynamically adds the instance's public IP to Django's ALLOWED_HOSTS setting, allowing health checks to succeed. The package depends only on requests and installs as a simple Django app configuration. Version 2.0.0 and later support IMDSv2 (the newer AWS metadata service); earlier versions support IMDSv1. It is marked Production/Stable but has been dormant since mid-2022, suggesting the problem it solves is stable and rarely needs changes. Use it for: - Running a Django application on AWS Elastic Beanstalk without manually managing ALLOWED_HOSTS for each instance's public IP. - Preventing health check failures caused by Django rejecting requests with unrecognized host headers in load-balanced environments. - Automating host validation on Elastic Beanstalk deployments to reduce configuration overhead and deployment errors. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automatically adds an Elastic Beanstalk instance's public IP to Django's ALLOWED_HOSTS during application startup, allowing health checks to succeed without 400 Bad Request errors. Yes, if you are running Django on AWS Elastic Beanstalk and experiencing health check failures due to ALLOWED_HOSTS validation. It solves a narrow, well-defined problem with minimal dependencies and no security vulnerabilities. The dormant maintenance status is not a concern for a stable, single-purpose utility. Install it if this is your deployment model; skip it otherwise. ## Install pip install django-ebhealthcheck uv add django-ebhealthcheck poetry add django-ebhealthcheck ## Installing django-ebhealthcheck Before you install: Installation is straightforward with low friction—a single wheel dependency on requests. The package is dormant (last release August 2022, last commit October 2023) but marked Production/Stable; it solves a narrow, stable problem unlikely to require frequent updates. License in practice: BSD permissive license imposes no significant restrictions; you may use, modify, and distribute the package freely in commercial and private projects. Quickstart: pip install django-ebhealthcheck # In settings.py INSTALLED_APPS: INSTALLED_APPS = [ ... 'ebhealthcheck.apps.EBHealthCheckConfig', ... ] Requires Django to be installed and configured; IMDSv2 support requires version 2.0.0 or higher (use version 1.x for IMDSv1-only environments). Verify before relying: - Whether the package works with current Django versions (latest release was August 2022). - Compatibility with Python versions beyond what the fact sheet specifies. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 80.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django elastic beanstalk health check, allowed hosts elastic beanstalk, django eb health check, beanstalk public ip django, elastic beanstalk 400 bad request, django imdsv2 health check, aws-elastic-beanstalk, django-middleware [View on SkillFed](https://skillfed.io/packages/django-ebhealthcheck) · [View on PyPI](https://pypi.org/project/django-ebhealthcheck/)