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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68370f1e3831388d87b503f3216592d37abafffa989770ba396d2566ed94b50b |
|
MD5 | 22a9215cd6f7952b35f0d7b46445447a |
|
BLAKE2b-256 | 05648d0d29332475bf89ef38fd46009e3b97aba1fe4e183efd45b1643f6215c5 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3fd3d02f712a7ea0913c5ada9dba6ff3c1877f8b2234c720c71f1a488965229 |
|
MD5 | 10db19943345c3190ca83d2e82ae4fed |
|
BLAKE2b-256 | c0fba56cfeceb04bcefc37c46f9daf5423ea148e472137b3596fc45eff03248b |