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.
const lb = new elb.LoadBalancer(this, 'LB', {
vpc,
internetFacing: true,
healthCheck: {
port: 80
},
});
lb.addTarget(myAutoScalingGroup);
lb.addListener({
externalPort: 80,
});
The load balancer allows all connections by default. If you want to change that,
pass the allowConnectionsFrom
property while setting up the listener:
lb.addListener({
externalPort: 80,
allowConnectionsFrom: [mySecurityGroup]
});
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.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8b1cf108b5c321db47745e7be5890eac75a6c1200122aff73b11fddb2f2e359 |
|
MD5 | 5ff7ae8f971da8939ca9504cb9f0abad |
|
BLAKE2b-256 | ba9c5df2a8b96c8ceae3b702d8a1f42d2fa8ac945f92ea24193cacc44a24b9d9 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58c05182d761ab6f15b4fe60eecde81a0fd09a05161e5733bf06a79ae0148478 |
|
MD5 | 1996e70f194ceda383aae21006b52824 |
|
BLAKE2b-256 | 38cc17198098ad323dba245d2bd7b100b96da53b105781cb927615c49cde3f66 |