# NOT RUN {
# This example creates a listener for your load balancer at port 80 using
# the HTTP protocol.
# }
# NOT RUN {
svc$create_load_balancer_listeners(
Listeners = list(
list(
InstancePort = 80L,
InstanceProtocol = "HTTP",
LoadBalancerPort = 80L,
Protocol = "HTTP"
)
),
LoadBalancerName = "my-load-balancer"
)
# }
# NOT RUN {
# This example creates a listener for your load balancer at port 443 using
# the HTTPS protocol.
# }
# NOT RUN {
svc$create_load_balancer_listeners(
Listeners = list(
list(
InstancePort = 80L,
InstanceProtocol = "HTTP",
LoadBalancerPort = 443L,
Protocol = "HTTPS",
SSLCertificateId = "arn:aws:iam::123456789012:server-certificate/my-server-cert"
)
),
LoadBalancerName = "my-load-balancer"
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataCamp Workspace