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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d54e5d72c7622ca30edea0e0d1af252894dd2963da3015c44f4fac275de5513 |
|
MD5 | 45ea758eb5435dcd9c8e48eb491cf1ef |
|
BLAKE2b-256 | f184f26dec86a5884a9c0db2ac40929d961e413d013dac904eed42c4f352f0e2 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.16.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d5541a0b830dcd8fd6aaa6e8eac859f95661de8644a708dc20cfc8c1f6bf50c |
|
MD5 | 3898f9f6943a4bc8c63e2ece62cd5bd8 |
|
BLAKE2b-256 | e72ce125d12ff60e474a8f07cbb7c425ed0e2a0a79d1da45a1aac8f7be3ab4a9 |