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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 645cfe5a7d565a521636ebfdc13200b57f1635bf3737b204541c0a1aad3c3856 |
|
MD5 | dbbaa31cdaf785f44925dccedbd56c11 |
|
BLAKE2b-256 | 95e7ea08588b4cbde5271f792f6ff42af3dd20b4d96bc59231b13568904838ef |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.16.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d70e661bd5b775b7cfb7af877caa6b3783f5d2462fa822010a95ba2c50609c57 |
|
MD5 | 5c0ebe712892d40a484cbd6b0993dc03 |
|
BLAKE2b-256 | d775e995f18c099933e8e218d9a243dcec33922d11bf8d8396e9803680d69a57 |