0

CloudFormation で自動スケーリング設定を使用しています。ALB ターゲットを追加します。自動スケーリングを使用するように ALB (クラシック LB ではない) を構成するにはどうすればよいですか? ALB ターゲットと私の Templetes の ARN は次のとおりです。ガイドでは、ALB のターゲット ARN を追加する必要があります。

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "asgautotestgr": {
      "Type": "AWS::AutoScaling::AutoScalingGroup",
      "Properties": {
        "AvailabilityZones": [
          "ap-southeast-1a"
        ],
        "Cooldown": "300",
        "DesiredCapacity": "2",
        "HealthCheckGracePeriod": "300",
        "HealthCheckType": "EC2",
        "MaxSize": "4",
        "MinSize": "2",
        "VPCZoneIdentifier": [ "subnet-3fe2c***" ],
        "LaunchConfigurationName": {
          "Ref": "lcautotest"
        },
        "LoadBalancerNames" : [ "arn:aws:elasticloadbalancing:ap-southeast-1:7****3:targetgroup/sgp-ALB/4*****2" ],
        "MetricsCollection": [
          {
            "Granularity": "1Minute",
            "Metrics": [
              "GroupInServiceInstances",
              "GroupMaxSize",
              "GroupPendingInstances",
              "GroupDesiredCapacity",
              "GroupStandbyInstances",
              "GroupTerminatingInstances",
              "GroupMinSize",
              "GroupTotalInstances"
            ]
          }
        ],
        "TerminationPolicies": [
          "Default"
        ]
      }
    },
    "lcautotest": {
      "Type": "AWS::AutoScaling::LaunchConfiguration",
      "Properties": {
        "IamInstanceProfile" : "Cd***2",
        "AssociatePublicIpAddress": true,
        "ImageId": "ami-*****0",
        "InstanceType": "t2.large",
        "KeyName": "key",
        "InstanceMonitoring": "true",
        "SecurityGroups": [ "sg-6***" ],
        "BlockDeviceMappings": [
          {
            "DeviceName": "/dev/sda1",
            "Ebs": {
              "SnapshotId": "snap-0e0edaa*6",
              "VolumeSize": 60
            }
          }
        ]
      }
    }
  },
  "Description": ""
}

私のALB ARNは聞こえます。arn:aws:elasticloadbalancing:ap-southeast-1:7*****3:loadbalancer/app/ALB-sgp/9*****6

およびALBターゲット。arn:aws:elasticloadbalancing:ap-southeast-1:7*****3:targetgroup/sgp-ALB/4*****2

4

0 に答える 0