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.38.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1b9efa64e883b1b3d09418413745edafd4a714092ff602933ae0397121d9fea |
|
MD5 | 02273f7c1796472e42887ce456c51a26 |
|
BLAKE2b-256 | 977d7126b7033eb4a191540fbd8b149dc58382eee16f308320b9b22647898acd |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.38.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92f691b943dd2c23250dd4dd792594a6453611ec17f6856779dbdc15ede2a6ef |
|
MD5 | a7301ae6255262816a9b19898872bb22 |
|
BLAKE2b-256 | 1b8c990086b82c445b52725a1e3029566303a7e836c3384f611b2bc4be233e5d |