AWS Elastic Load Balancing App Cookie Stickiness Policy
This page shows how to write Terraform and CloudFormation for Elastic Load Balancing App Cookie Stickiness Policy and write them securely.
aws_app_cookie_stickiness_policy (Terraform)
The App Cookie Stickiness Policy in Elastic Load Balancing can be configured in Terraform with the resource name aws_app_cookie_stickiness_policy
. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_app_cookie_stickiness_policy" "this" {
cookie_name = var.cookie_name
lb_port = var.lb_port
load_balancer = var.load_balancer
name = var.name
}
Parameters
-
cookie_name
required - string -
id
optional computed - string -
lb_port
required - number -
load_balancer
required - string -
name
required - string
Explanation in Terraform Registry
Provides an application cookie stickiness policy, which allows an ELB to wed its sticky cookie's expiration to a cookie generated by your application.
Tips: Best Practices for The Other AWS Elastic Load Balancing Resources
In addition to the aws_elb, AWS Elastic Load Balancing has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
aws_elb
Ensure your ALB blocks unwanted access
It is better to limit accessibility to the minimum that is required for the application to work.
AWS::ElasticLoadBalancing::LoadBalancer AppCookieStickinessPolicy (CloudFormation)
The LoadBalancer AppCookieStickinessPolicy in ElasticLoadBalancing can be configured in CloudFormation with the resource name AWS::ElasticLoadBalancing::LoadBalancer AppCookieStickinessPolicy
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
CookieName
The name of the application cookie used for stickiness.
Required: Yes
Type: String
Update requires: No interruption
PolicyName
The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.
Required: Yes
Type: String
Update requires: No interruption
Explanation in CloudFormation Registry
Specifies a policy for application-controlled session stickiness for your Classic Load Balancer.
To associate a policy with a listener, use the PolicyNames property for the listener.
Frequently asked questions
What is AWS Elastic Load Balancing App Cookie Stickiness Policy?
AWS Elastic Load Balancing App Cookie Stickiness Policy is a resource for Elastic Load Balancing of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Elastic Load Balancing App Cookie Stickiness Policy?
For Terraform, the niveklabs/aws source code example is useful. See the Terraform Example section for further details.