Brian
Brian

Reputation: 13573

Why are all the EC2 instances launched in the same availability zone?

I have an AWS elastic beanstalk environment which contains an application load balancer that has 3 availability zones.

enter image description here

I'm wondering why all my 3 EC2 instances launched by elastic beanstalk are located in ap-northeast-1c.

Is it possible to launch EC2 instances evenly in all the availability zones? I mean 1 instance per availability zone.

The Auto Scaling Group in the Configuration section of elastic beanstalk contains 3 AZs.

enter image description here

But as you can see from the picture above, they are all grey, which means I'm not able to edit them. This is strange.

If I open EC2 Service -> Auto Scaling Group, I found that the auto scaling group contains only 1 AZ. This is not consistent with the setting in elastic beanstalk.

enter image description here

Upvotes: 1

Views: 964

Answers (1)

Juned Ahsan
Juned Ahsan

Reputation: 68715

Your Elastic Beanstalk includes an Auto Scaling group that manages the Amazon EC2 instances in your environment. You may be using only one availability zone in your auto-scaling configuration.

Go to

Elastic Beanstalk console -> Management page for your environment -> Choose Configuration -> Auto Scaling Group -> Availability Zones

Choose the number of Availability Zones to spread your environment's instances across. By default, the Auto Scaling group launches instances evenly across all usable zones.

For full steps and further understanding

Auto Scaling Group for Your AWS Elastic Beanstalk Environment

EDIT: Try Auto Scaling Group under Configuration > Network and select the subnet

Upvotes: 3

Related Questions