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 may have issues. 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 may have issues. 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.16.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 925046a373798376411b257e0818c2f22125e081fa0a5bdd1b9491fe2e0f0206 |
|
MD5 | f9d8ad818e8b5f490ecba7b89d941eb5 |
|
BLAKE2b-256 | 4cb86eeb32d8e61ecc709a7fbaab0e55bbe5a9467871840444f4064a238ceb0c |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.16.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c096869c21199a5276984d7117afcc5f5a2dd60ac8ecfc361684cf4ec51177d7 |
|
MD5 | d03e305fdb20878a95015f8499a6461f |
|
BLAKE2b-256 | 6df1f3d70b66116acb14f902963ecd60c7cd0fb37f7f61745f7b79f88cb487df |