Availability Zone ap-northeast-1b cannot be associated with a load balancer

1.4k views Asked by At

I'm trying to create cluster with ECS (Fargate) with nginx definition from Get Started button. But it becomes with following error message.

The following Availability Zones ap-northeast-1b cannot be associated with a load balancer. Please try a different Availability Zone.

All other VPC and subnets are created successfully, but only ALB cause error. When I try to create cluster without ALB, it works.

I also tried to create subnets (in ap-northeast-1a and ap-northeast-1b) and ALB by hand for verification, and it does show error when ALB is set to associate to ap-notheast-1b subnet.

How can this happen? And what can I do for Get Started nginx template with ALB to work fine?

1

There are 1 answers

1
albogdano On

I came across the same error but when creating a CloudFormation stack from a template. The error I got was similar:

Creating load balancer failed Reason: 
The following Availability Zones ap-northeast-1a cannot be associated with a load balancer. 
Please try a different Availability Zone. (Service: AmazonElasticLoadBalancing; 
Status Code: 400; 
Error Code: ValidationError; 

I could not find any official AWS documentation on the topic. Apparently some availability zones in some regions do not support ALB but that's not documented anywhere. I was able to work around the issue by configuring the ALB to use ap-northeast-1c and ap-northeast-1b (in that order!).

You should modify your ECS settings to use AZ 1c first then AZ 1b but not AZ 1a.