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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 674d51ab217cc15a77ecb03dabc5cc29d8bee590e1c2c679e315ed821ccd51af |
|
MD5 | de449598b6d8ad6029a62b9b0bd72d22 |
|
BLAKE2b-256 | 69ea9668dba86309402cc3b31567b44eefaa4fa337867b52fa7d90c80b3e2b9c |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.16.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd7fd9696970cfe848213f9a2380fbcdb2a7f4a5efc4f65b7aa78eb0dd6a26b6 |
|
MD5 | c49098ab1ba7f4b828c3060a62032c5a |
|
BLAKE2b-256 | 59560241d54d29fc2a047b26a981d332b189391995923b7d481a39531b9bb870 |