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.31.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b87466bc5d1af1f57ce972b802d2820f5c3e9f58abeba4a2fba2e43ae510e0 |
|
MD5 | 06841dd43fe985ffeb287c8dd44698d0 |
|
BLAKE2b-256 | 39a99ce92805ce0248b9c34344d2b36c9895aa39afeea980dde485f73ec09d5d |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-0.31.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b771a67fae4adb233736df60a5bfeebc3df8e900072985efc2da853e0f82647 |
|
MD5 | c4f8637c60e8b3b1408d4ecc66297612 |
|
BLAKE2b-256 | 8e5925ca4c09636cdfa59acef15eea5412375a4edd75399408566fa0fe5fa47d |