The CDK Construct Library for AWS::ElasticLoadBalancing
Project description
Amazon Elastic Load Balancing Construct Library
---The @aws-cdk/aws-elasticloadbalancing
package provides constructs for configuring
classic load balancers.
Configuring a Load Balancer
Load balancers send traffic to one or more AutoScalingGroups. Create a load
balancer, set up listeners and a health check, and supply the fleet(s) you want
to load balance to in the targets
property.
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
lb = elb.LoadBalancer(self, "LB",
vpc=vpc,
internet_facing=True,
health_check={
"port": 80
}
)
lb.add_target(my_auto_scaling_group)
lb.add_listener(
external_port=80
)
The load balancer allows all connections by default. If you want to change that,
pass the allowConnectionsFrom
property while setting up the listener:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
lb.add_listener(
external_port=80,
allow_connections_from=[my_security_group]
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for aws-cdk.aws-elasticloadbalancing-1.132.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d648348b011da70afb8020c0f8464280ed5e4f89a1af647f0b25c1d8bc67689d |
|
MD5 | e6e82a440c81453858a102d1c840653a |
|
BLAKE2b-256 | 8c1e97ae4a5073aec08f2afc7ba4642d6320412664a311c351ec2087fc949182 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.132.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e23cd4fddc3c7f47d6d7cd469d67e9667ce71d9f19a011a3b4eb11cdf18af9 |
|
MD5 | 7e8bf7219aa5c7e8971a8836f94e7a90 |
|
BLAKE2b-256 | be969162e084235fbedb31a0344048ffa7b120790354f85d2bc70ab07365fb04 |