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.28.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe06bdbaeb3e941f37dbd4165002e703d0b84a4e2d512cb99198041172228ca9 |
|
MD5 | e1cb1cea007a68495a783485778ecd56 |
|
BLAKE2b-256 | a2cb1e37a2af0e26c983e7ce2735130fd9e0f59bf6e93b2dac152754d75c3044 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-0.28.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37a10ec98795dac8004b9c009936c84d3315f7b29f11e80f3fdad5a569bffd6e |
|
MD5 | e8eece8186c9fc7583f7c920eb6b9e46 |
|
BLAKE2b-256 | 45f6c75f0747a8e81f900087bd55ce30ede3c6359e371aa4fe8a6beae1528bd1 |