LoginSignup
0
0

The following Availability Zones ap-northeast-1b cannot be associated with a load balancerが出たら。。。

Posted at

はじめに

aws cdkALBApplicationLoadBalancedFargateServiceなどを東京リージョンで作成する際に、何も指定しなければ自動でAvailability Zonesが指定されますが、デプロイするとエラーが出ます。

エラー文

The following Availability Zones ap-northeast-1b cannot be associated with a load balancer. 
Please try a different Availability Zone. (Service: AmazonElasticLoadBalancing; Status Code: 400; Error Code: ValidationError; Request ID: hoge; Proxy: null)

対処法

自動生成されているcdk.context.jsonを修正する

修正前

cdk.context.json
{
  "availability-zones:account=888888888888:region=ap-northeast-1": [
    "ap-northeast-1a",
    "ap-northeast-1b",
    "ap-northeast-1c",
    "ap-northeast-1d"
  ],
}

修正後

アベイラビリティーゾーンをap-northeast-1aap-northeast-1cだけにするとうまくデプロイできました。

cdk.context.json
{
  "availability-zones:account=888888888888:region=ap-northeast-1": [
    "ap-northeast-1a",
    "ap-northeast-1c"
  ],
}

現場からは以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0