Modifying the Attributes of a Load Balancer

You can modify the following attributes of a load balancer:

  • Publication of access logs in an OUTSCALE Object Storage (OOS) bucket

  • Secure cookie setting

  • Connection draining setting

  • Idle connection setting

You can associate an External IP (EIP) with an internet-facing load balancer through the OUTSCALE API only. For more information see the OSC CLI section below.

Modifying the Attributes of a Load Balancer Using Cockpit v1

Before you begin: Create an OOS bucket in the same Region, or get the access rights of an OOS bucket in the same Region. For more information, see Creating a Bucket or Configuring a Bucket ACL.

  1. Click Services > Load Balancers.

  2. Click the load balancer whose attribute you want to modify.
    The load balancer is selected.

  3. Click Modify Attributes .
    The MODIFY ATTRIBUTES dialog box appears.

Enabling or Disabling Access Logs

  1. If enabling access logs, do the following actions:

    1. Check the Enable logs box.

    2. In the OOS Bucket Name field, type the name of the OOS bucket in which to publish the logs.

    3. In the Emit Interval field, select the time interval for the publication of the access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).

  2. If disabling access logs, uncheck the Enable logs box.

Enabling or Disabling Secured Cookies

  1. If enabling secured cookies, check the Enable Secured Cookies box.

  2. If disabling secured cookies, uncheck the Enable Secured Cookies box.

Enabling or Disabling Connection Draining

  1. If enabling connection draining, do the following actions:

    1. Check the Enable Connection Draining box.

    2. In the Timeout field, type the maximum time that the load balancer keeps the existing connections open before deregistering instances, in seconds (by default, 1).

  2. If disabling connection draining, uncheck the Enable Connection Draining box.

Enabling or Disabling Connection Settings

  1. If enabling connection settings, do the following actions:

    1. Check the Enable Connection Settings box.

    2. In the Idle Timeout field, type the time that the connection is allowed to be idle, meaning no data is sent over, before it is closed by the load balancer, in seconds (by default, 1).

  2. If disabling connection settings, uncheck the Enable Connection Settings box.

  3. Click Modify to validate.
    The attributes of the specified load balancer are modified.

Modifying the Attributes of an Internet-facing Load Balancer Using OSC CLI

See the UpdateLoadBalancer command sample in the documentation of the OUTSCALE API.

Modifying the Attributes of a Load Balancer Using AWS CLI

To modify the attributes of your load balancers, use the modify-load-balancer-attributes command following this syntax:

Request sample
$ aws elb modify-load-balancer-attributes \
    --profile YOUR_PROFILE \
    --load-balancer-name LOAD_BALANCER_NAME \
    --load-balancer-attributes "{ \
                                 \"AccessLog\": \
                                             { \
                                              \"Enabled\": true, \
                                              \"S3BucketName\": \"BUCKET_NAME\", \
                                              \"EmitInterval\": 60, \
                                              \"S3BucketPrefix\": \"BUCKET_PREFIX\" \
                                             }, \
                                \"AdditionalAttributes\": \
                                            { \
                                             \"Key\": \"SecuredCookies\", \
                                             \"Value\": \"true\" \
                                            }, \
                                \"ConnectionDraining\": \
                                            { \
                                             \"Enabled\": true, \
                                             \"Timeout\": 20 \
                                            }, \
                                \"ConnectionSettings\": \
                                            { \
                                             \"IdleTimeout\": 60 \
                                            } \
                               }" \
    --endpoint https://lbu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • load-balancer-name: The name of the load balancer whose attributes you want to modify.

  • load-balancer-attributes: The attributes of the load balancer you want to modify. The following attributes are available:

    • (optional) AccessLog: Information about the publication of the access logs. This element contains the following attributes that you need to specify:

      • Enabled: If true, access logs are enabled for the specified load balancer. If false, they are not.

        If you enable access logs, you must specify the S3BucketName attribute below.

      • (optional) S3BucketName: The name of the OOS bucket in which to publish the access logs. For more information, see About OOS.

      • (optional) EmitInterval: The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).

      • (optional) S3BucketPrefix: The path to the folder in your OOS bucket in which to publish the access logs (by default, the root level of your bucket).

    • (optional) ConnectionDraining: Information about the draining of the connections to unhealthy or deregistered instances.

      • Enabled: If true, connection draining is enabled for your load balancer. In this case, existing requests are completed before the connections are closed. If false, it is not (by default, false).

      • (optional) Timeout: The maximum time that the load balancer keeps the existing connections open before deregistering instances, in seconds (by default, 20).

    • (optional) ConnectionSettings: Information about idle connections.

      • IdleTimeout: The time that the connection is allowed to be idle, meaning no data is sent over, before it is closed by the load balancer, in seconds. By default, set to 30 for the front-end connection and 60 for the back-end connection of your load balancer.

        If you set a new duration, the same value is applied to both the front-end and back-end connections.

    • (optional) AdditionalAttributes: Information about additional load balancer attributes, for example secure cookies.

      • Key: The name of the attribute. You can configure secure cookies on your load balancer with SecuredCookies.

      • Value: The value of the attribute. If the Key is SecuredCookies, set the Value to true to enable secure cookies and false to disable them.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The modify-load-balancer-attributes command returns the following elements:

  • LoadBalancerName: The name of the load balancer.

  • LoadBalancerAttributes: Information about the load balancer you modified. This element contains the following information:

    • AccessLog: Information about the publication of access logs. This element contains the following information:

      • Enabled: If true, access logs are enabled for the specified load balancer. If false, they are not.

      • S3BucketName: The name of the OOS bucket in which the access logs are published. For more information, see About OOS.

      • EmitInterval: The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).

      • S3BucketPrefix: The path to the folder in your OOS bucket in which the access logs are published (by default, the root level of your bucket).

    • ConnectionDraining: Information about the draining of the connections. This element contains the following information:

      • Enabled: If true, connection draining is enabled for your load balancer. If false, it is not.

      • Timeout: The time that the load balancer keeps the existing connections open before deregistering instances, in seconds.

    • ConnectionSettings: Information about idle connections. This element contains the following information:

      • IdleTimeout: The time that the connection is allowed to be idle before it is closed by the load balancer.

    • AdditionalAttributes: Information about additional load balancer attributes. This element contains the following information:

      • Key: The name of the attribute, for example secured_cookies.

      • Value: The value of the attribute. If the Key is secured_cookies and the Value is true, secure cookies are enabled. If false, they are not.

Result sample
{
    "LoadBalancerName": LOAD_BALANCER_NAME,
    "LoadBalancerAttributes": {
        "AccessLog": {
            "Enabled": true,
            "S3BucketName": "BUCKET_NAME",
            "EmitInterval": 60,
            "S3BucketPrefix": "BUCKET_PREFIX"
        },
        "AdditionalAttributes": {
            "member": {
                "Key": "secured_cookies",
                "Value": "true"
            }
        },
        "ConnectionDraining": {
            "Enabled": true,
            "Timeout": 20
        },
        "ConnectionSettings": {
            "IdleTimeout": 60
        }
    }
}

The attributes of the specified load balancer are modified.

After you disable access logs, the existing log files remain in the OOS bucket until you delete them. For more information, see Removing Objects from a Bucket.

Related Pages

Corresponding API Method

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.