0

I have an Elastic Beanstalk (EB) set up with a running application on a PHP/Apache server. The application was running OK since many hours ago when the EB's health got subtly RED and I don't know why. No logs was available on EB > My Application > Logs > Request Logs > Full Logs (and also Last 100 Lines).

And these were the last events on my EB until its health got RED, on EB > My Application > Events:

2015-07-11 04:40:43 UTC-0300    WARN    Environment health has transitioned from YELLOW to RED
2015-07-11 04:38:41 UTC-0300    WARN    Environment health has transitioned from GREEN to YELLOW
2015-07-11 04:38:41 UTC-0300    WARN    Elastic Load Balancer awseb-e-g-AWSEBLoa-1H3WKQE404YBT has zero healthy instances.
2015-07-11 04:38:03 UTC-0300    INFO    Removed instance 'i-171a5303' from your environment. (Reason: Instance is in 'shutting-down' state)
2015-07-11 04:31:19 UTC-0300    INFO    Removed instance 'i-c0f3bdd4' from your environment. (Reason: Instance is in 'shutting-down' state)
2015-07-11 04:24:11 UTC-0300    INFO    Removed instance 'i-908daa73' from your environment. (Reason: Instance is in 'shutting-down' state)

The third event above shows that Load Balancer has zero healthy instances. Why?

Also, we often receive this via email from AWS:

Message: Launching a new EC2 instance. Status Reason: We currently do not have sufficient m3.medium capacity in the Availability Zone you requested (sa-east-1b). Our system will be working on provisioning additional capacity. You can currently get m3.medium capacity by not specifying an Availability Zone in your request or choosing sa-east-1a, sa-east-1c. Launching EC2 instance failed.

If the problem is with the sa-east-1b zone, why didn't AWS automatically launch an instance on sa-east-1a or sa-east-1c zones, as we don't specify any Availability Zone?

We have auto-scaling set up for any Availability Zone. Our Load Balancer is set up for the Availability Zones that we want: sa-east-1a, sa-east-1b or sa-east-1c, but the option Cross-zone load balancing is NOT enabled, because we fear that it might launch instances out of São Paulo (sa-east) region - what we don't want it to do.

So, should I enable the option Cross-zone load balancing on Load Balancing for AWS to get our application up on any Availability Zones in São Paulo (sa-east) region?

Any ideas?!

2 Answers 2

0

You're ELB has to be in multiple AZ's (subnets in different availability zones), same with elastic beanstalk. My guess is that somewhere in the configuration it is only allowed to spin up instances in 1b, so it was unable to capture an instance in your specified zone.

3
  • But I don't want my application on any region except São Paulo (sa-east) region...
    – cawecoy
    Jul 21, 2015 at 17:14
  • question update: Our Load Balancer is set up for the Availability Zones that we want: sa-east-1a, sa-east-1b or sa-east-1c, but the option Cross-zone load balancing is NOT enabled, because we fear that it might launch instances out of São Paulo (sa-east) region - what we don't want it to do.
    – cawecoy
    Jul 21, 2015 at 17:25
  • @cawecoy ELB does not actually support instances in multiple regions, and neither does Elastic Beanstalk (EB). Your concern is unfounded. Accidentally launching into a different region is impossible. You need to enable cross-availability zone load balancing, and configure EB to use all zones in the region. Jul 21, 2015 at 22:44
0

You can change your ELB and EC2 instances AZ using Elastic Beanstalk Web Console.

Open your EB Application Configuration, and change the AZs in the Scaling (for Classic environment) or VPC (for VPC environment).

Look at my answer in here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .