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.57.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | abb0f64aebd3890abf4001c5ca387b15a39dd72e27f572800b245fb0e525b336 |
|
MD5 | 2eb42dd2701c2834b7b641a15c37f765 |
|
BLAKE2b-256 | 56e45d909faeb11060f3fb095ed7282664c054462eda6041695834417284b01f |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.57.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 065178236b1d1c5c8487e6a3bd6a925683836df5f782a6a27f1072b00140ab47 |
|
MD5 | bcf7bfa9c00d9315085fd619c0756db1 |
|
BLAKE2b-256 | 6a6f451e7f69b677580b7d99b12fb1e8a6c12da53a7d2ab6ba8f6a235cb0b219 |