CDK Constructs 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.25.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe420e0c4bdedb1c5d30b3ccc282353153f0d0b2f40e5822022c78db0868e473 |
|
MD5 | 17c8004d8e757e2bcbdf9b9430f465ea |
|
BLAKE2b-256 | 95a6941e4b34d4caf6ce000950606003a5374f97c29b9b4cad7daf05332fd29b |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.25.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0da786adc5a2ffb06c5e07bdad33461f50dbffbb2618568d17922cd67299938d |
|
MD5 | 6b61d2a821c521ee9395f5c8238dca5e |
|
BLAKE2b-256 | 53e06faa80d808f96ec1067ceef4c49358e50e53b39d2c3d52b8e80357f14a50 |