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.13.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35dd09112e8eb4663ac328d96ea42adf8a647a19aee25820b779ceabc4930c96 |
|
MD5 | 4dd69d16506c87c3ebb7fa3ea0437ca0 |
|
BLAKE2b-256 | a4b4ed727689063d56a648a4787f0071cccc67224507941eeb996e8585fb15a5 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.13.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c8cbdb4f6d13348c50e3cb391f3e4427607f98ec7a696b8c74872ab59a04462 |
|
MD5 | eb1d896f6f2e0b3f975df1a9b457ba0a |
|
BLAKE2b-256 | 31ef5807242d2e1d7f22aa61f81c6ec392f26a4cf865111f19c9c06d8881095d |