Configure Connection Draining for AWS Load Balancer v2 in CloudFormation

萝らか妹 提交于 2020-01-02 07:15:27

问题


This blog post (here specifically) details how to configure connection draining for a 'classic' version 1 load balancer using the AWS::ElasticLoadBalancing::LoadBalancer type, like so:

"ElasticLoadBalancer": {
  "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
  "Properties": {
    "ConnectionDrainingPolicy": {
      "Enabled": "true",
      "Timeout": "300"
    },
    ...
  }
}

How can I do this using the version 2 load balancer with type AWS::ElasticLoadBalancingV2::LoadBalancer?

My best guess from the documentation is that I should use LoadBalancerAttributes, but I can't find anything related to connection draining in the list of attributes here.


回答1:


In Application Load Balancer(ELB V2 ) it in configured using TargetGroups and TargetGroupAttributes

deregistration_delay.timeout_seconds - The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

   TargetGroup:
      Type: AWS::ElasticLoadBalancingV2::TargetGroup
      Properties:
        TargetGroupAttributes:
        - Key: deregistration_delay.timeout_seconds
          Value: '20'


来源:https://stackoverflow.com/questions/49257224/configure-connection-draining-for-aws-load-balancer-v2-in-cloudformation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!