When spinning up a new service, Amazon Elastic LoadBalancer needs to check if the service is live and running.
This check is done from an IP (from any IP in a private IP range) to the service, this is done by the ELB just doing a simple GET
request to a specified path, with no host information - for example GET /heatbeat
.
If this instance is a Django service, regardless of the page accessed, this call will fail as in a properly setup Django it is very unlikely that the IP will be in Django's settings.ALLOWED_HOSTS
settings.
There are two ways around this, either:
a. Add every IP from every private IP range into your Django project's ALLOWED_HOSTS
settings