Sticky Sessions allows a users session to always be sent to the same exact Instance through a load balancer. This option is available on the Classic Load Balancer, Application Load Balancer, and Network Load balancer. This functionality is implemented through the use of a cookie with customizable expiration date that is passed to the requesting client machine. The reason for implementation of Sticky Sessions is to ensure the client does not loss his session data. Enabling Sticky Session can introduce an imbalance on applications.
Sticky Sessions Cookie Names and types:
1. Application-based Cookies
a. Custom cookie
I. Generated by the target
ii. Can include custom attributed required by application
iii. Names must be specified for each target group
iv. Cannot name AWSALB, AWSALBAPP, or AWSALBTG this are reserved
b. Application cookie
i. Generated by the load balancer
ii. Named AWSALBAPP
2. Duration-based Cookied
a. Cookie generated by the load balancer
b. Cookie name is AWSALB for ALB and AWSELB for CLB
1. Logon to AWS as an IAM user at URL: https://signin.aws.amazon.com/

2. From the Home Console type EC2 in the search bar, select the star next to EC2, and select EC2

3. On the left hand menu bar select Target Groups

4. At the target group page, select your target group and

5. Select Actions ? Edit traget group attributes

6. Scroll down the page place a check mark on Turn on Stickiness, than you can either choose Load Balancer or Application-based ( Under application-based you have to name the cookie), Set the duration of the cookie. Finally select the Save changes button.

7. Now after your first connection you will get the same application server for the duration of your cookie.