title: Configure Connection Draining for AWS Load Balancer v2 in CloudFormation
body: <p><a href="https://aws.amazon.com/blogs/aws/elb-connection-draining-remove-instances-from-service-with-care/" rel="noreferrer">This blog post</a> (<a href="https://s3.amazonaws.com/cloudformation-templates-us-east-1/ELBGDAL.template" rel="noreferrer">here specifically</a>) details how to configure connection draining for a 'classic' version 1 load balancer using the <code>AWS::ElasticLoadBalancing::LoadBalancer</code> type, like so:</p>
  
  <pre><code>"ElasticLoadBalancer": {
    "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
    "Properties": {
      "ConnectionDrainingPolicy": {
        "Enabled": "true",
        "Timeout": "300"
      },
      ...
    }
  }
  </code></pre>
  
  <p>How can I do this using the version 2 load balancer with type <code>AWS::ElasticLoadBalancingV2::LoadBalancer</code>?</p>
  
  <p>My best guess from <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html" rel="noreferrer">the documentation</a> is that I should use <code>LoadBalancerAttributes</code>, but I can't find anything related to connection draining in the <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes" rel="noreferrer">list of attributes here</a>.</p>