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.47.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa2ab3b7fc2e91ccd9ce3141c839ae6d3ae0c1bf3ee54dbad0699a83dccd0307 |
|
MD5 | 6ca2f6f54b6f156e604dac0c144c5223 |
|
BLAKE2b-256 | fa55a3593618b2e6354dba5f5614d440178c6d2db932f2c9e9f16f999d53e182 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.47.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4821bce85f52f69f1ac919fb1596f5d8399ff1639047056d47ffc5f97d75135 |
|
MD5 | c7b6c0fc57cf37d9f9c892a34f8d80f4 |
|
BLAKE2b-256 | adad54f1a616de6f25e7f8b804a8d57982477063e17ef1e7f16931c8c0292640 |