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.49.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 987b75bf00c69d0448e5b09469784cae5bf51c58ae69b92a4743195acb089215 |
|
MD5 | 66776d0ff5626a20299a9f84be3fa11b |
|
BLAKE2b-256 | 1a807c80c42cb9b15598e9c7ac3d144e50f9540374b5d1833cb2f27138ae01cf |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.49.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b586a566fe435f8776d8d977e212e0fde39e77ecb791f183877502609716c36 |
|
MD5 | db5d3eef5b3e3eae30f42b904c98464f |
|
BLAKE2b-256 | e0855f561dbbf679c361bbebc5679da986280e60a081578581c366b694c7518d |