AWS code-library documentation change
Summary
Added multiple PowerShell V5 examples including HTTPS listener configuration with SSL certificates
Security assessment
Examples show secure load balancer creation with HTTPS/SSL configurations, but no evidence of addressing a specific security vulnerability
Diff
diff --git a/code-library/latest/ug/elastic-load-balancing_example_elastic-load-balancing_CreateLoadBalancer_section.md b/code-library/latest/ug/elastic-load-balancing_example_elastic-load-balancing_CreateLoadBalancer_section.md index 2b90daffc..0e1ec73d0 100644 --- a//code-library/latest/ug/elastic-load-balancing_example_elastic-load-balancing_CreateLoadBalancer_section.md +++ b//code-library/latest/ug/elastic-load-balancing_example_elastic-load-balancing_CreateLoadBalancer_section.md @@ -151,0 +152,46 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example creates a load balancer with an HTTP listener in a VPC.** + + + $httpListener = New-Object Amazon.ElasticLoadBalancing.Model.Listener + $httpListener.Protocol = "http" + $httpListener.LoadBalancerPort = 80 + $httpListener.InstanceProtocol = "http" + $httpListener.InstancePort = 80 + New-ELBLoadBalancer -LoadBalancerName my-vpc-load-balancer -SecurityGroup sg-a61988c3 -Subnet subnet-15aaab61 -Listener $httpListener + + my-vpc-load-balancer-1234567890.us-west-2.elb.amazonaws.com + + +**Example 2: This example creates a load balancer with an HTTP listener in EC2-Classic.** + + + New-ELBLoadBalancer -LoadBalancerName my-classic-load-balancer -AvailabilityZone us-west-2a` -Listener $httpListener + + +**Output:** + + + my-classic-load-balancer-123456789.us-west-2.elb.amazonaws.com + +**Example 3: This example creates a load balancer with an HTTPS listener.** + + + $httpsListener = New-Object Amazon.ElasticLoadBalancing.Model.Listener + $httpsListener.Protocol = "https" + $httpsListener.LoadBalancerPort = 443 + $httpsListener.InstanceProtocol = "http" + $httpsListener.InstancePort = 80 + $httpsListener.SSLCertificateId="arn:aws:iam::123456789012:server-certificate/my-server-cert" + New-ELBLoadBalancer -LoadBalancerName my-load-balancer -AvailabilityZone us-west-2a -Listener $httpsListener + + my-load-balancer-123456789.us-west-2.elb.amazonaws.com + + + * For API details, see [CreateLoadBalancer](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +