Elastic Load Balancing
API Reference (API Version 2012-06-01)


Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.

This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie.

If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.

For more information, see Application-Controlled Session Stickiness in the Classic Load Balancer Guide.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


The name of the application cookie used for stickiness.

Type: String

Required: Yes


The name of the load balancer.

Type: String

Required: Yes


The name of the policy being created. Policy names must consist of alphanumeric characters and dashes (-). This name must be unique within the set of policies for this load balancer.

Type: String

Required: Yes


For information about the errors that are common to all actions, see Common Errors.


A policy with the specified name already exists for this load balancer.

HTTP Status Code: 400


The requested configuration change is not valid.

HTTP Status Code: 409


The specified load balancer does not exist.

HTTP Status Code: 400


The quota for the number of policies for this load balancer has been reached.

HTTP Status Code: 400


Generate a Stickiness Policy

This example generates a stickiness policy that follows the sticky session lifetimes of the application-generated cookie.

Sample Request &LoadBalancerName=my-loadbalancer &PolicyName=my-app-sticky-policy &CookieName=my-app-cookie &Version=2012-06-01 &AUTHPARAMS

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: