月: 2021年2月

  • AWS Directory Service  について

    AWS Directory Service について

    AWS では Active Directory / LDAP アプリケーションは大きく3つ存在している。全ての説明は Classmethod 社の記事がわかりやすかったので引用する。

  • ALB の設定を aws cli で確認する

    ALB の設定を aws cli で確認する

    1コマンドで確認することができる。

    aws --profile stg elbv2 describe-load-balancers --load-balancer-arns arn:aws:elasticloadbalancing:ap-northeast-1:01234567:loadbalancer/net/tsukadanlb/a1b2c3d4e5

    結果は以下の通り

    {
        "LoadBalancers": [
            {
                "LoadBalancerArn": "arn:aws:elasticloadbalancing:ap-northeast-1:708179590705:loadbalancer/net/tsukadanlb/a1b2c3d4e5",
                "DNSName": "tsukada-nlb-a1b2c3d4e5.elb.ap-northeast-1.amazonaws.com",
                "CanonicalHostedZoneId": "a1b2c3d4e5",
                "CreatedTime": "2019-06-06T11:01:01.615000+00:00",
                "LoadBalancerName": "tsukada-nlb",
                "Scheme": "internal",
                "VpcId": "vpc-a1b2c3d4e5",
                "State": {
                    "Code": "active"
                },
                "Type": "network",
                "AvailabilityZones": [
                    {
                        "ZoneName": "ap-northeast-1c",
                        "SubnetId": "subnet-a1b2c3d4e5",
                        "LoadBalancerAddresses": []
                    },
                    {
                        "ZoneName": "ap-northeast-1a",
                        "SubnetId": "subnet-a1b2c3d4e5",
                        "LoadBalancerAddresses": []
                    }
                ],
                "IpAddressType": "ipv4"
            }
        ]
    }
  • cannot be deleted because it is currently associated with another service

    NLB を削除できない場合、

    API Gateway に VPC links の設定が残っている場合が多い。

    API Gateway で VPC links で NLB を登録していたが、先にその設定を解除(削除)する必要がある。

  • The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.

    The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.

    CodeDeploy で Step 3 で失敗することがある。

    The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.

    上記エラーの対処をまとめる。

    原因を探っていくと、AllowTraffic で 1時間以上も時間がかかって失敗していた。

    この処理の Script の中身を確認するものの何も書かれていない。

    この原因について調査し、原因がわかったので備忘録として記載すると、

    これは LoadBalancer から新しくDeploy されたインスタンスへのトラフィックが流れない事が原因だった。

    具体的に言うと LoadBalancer から新インスタンスへの health check が通っていない状況。

    LoadBalancer の health check を修正する事で deploy が成功するようになった。