CDK Constructs for AWS ElasticLoadBalancing
Project description
AWS Elastic Load Balancing Construct Library
The @aws-cdk/aws-ec2
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-0.29.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8b2f473b219bd24a012eb6af0b24aaefc205cbd3e791e6358012cc4494ccd75 |
|
MD5 | 9983fed64d4a47ea6cb050328045949c |
|
BLAKE2b-256 | 3cc4de7752d7fb276d012b22fa17ae2c5a7e6f540327e9255413473cb043422a |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-0.29.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1a4a45da5fbe92d2651ef80d4b6b84caeb95a3f84d0662c9cda4d12f144b12f |
|
MD5 | b9caa1cc57e6d1f3cf353bb9f5f99848 |
|
BLAKE2b-256 | d2cebdd1be3975b10efdc17b0042da4957bbe3b6a9f63c123a9dc82f9953bf72 |