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.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96f179e1b1e8fa5892e72b98caf9f4819928257f16caa0a05a66bd84da91a1ef |
|
MD5 | 97837bf3b3fe97a431d12219d801d4f4 |
|
BLAKE2b-256 | 72e1247ad214c72596c594f7f887c072715dd574d6e960688972028abfbdd64b |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90fe16a1c753273b483fd5cd783863071f8413ef4968dac0a73ce21b2fff0d29 |
|
MD5 | 18497c93569e55e2eac27dad484f4f39 |
|
BLAKE2b-256 | 55dbc4f2930f79697c6bcae6963ce062b22900b63c0b9f92ba5badc2d6c7aead |