There are more AWS SDK examples available in the AWS Doc SDK Examples
Use CreateAppCookieStickinessPolicy
with a CLI
The following code examples show how to use CreateAppCookieStickinessPolicy
.
- CLI
-
- AWS CLI
-
To generate a stickiness policy for your HTTPS load balancer
This example generates a stickiness policy that follows the sticky session lifetimes of the application-generated cookie.
Command:
aws elb create-app-cookie-stickiness-policy --load-balancer-name
my-load-balancer
--policy-namemy-app-cookie-policy
--cookie-namemy-app-cookie
-
For API details, see CreateAppCookieStickinessPolicy
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example creates a stickiness policy that follows the sticky session lifetimes of the specified application-generated cookie.
New-ELBAppCookieStickinessPolicy -LoadBalancerName my-load-balancer -PolicyName my-app-cookie-policy -CookieName my-app-cookie
-
For API details, see CreateAppCookieStickinessPolicy in AWS Tools for PowerShell Cmdlet Reference.
-