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.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90c998537e463e9131925049bc2a4cd0945331f21f6d4c17a972ca808daaeae3 |
|
MD5 | 9e5ac682cebed46dd9e6e0608a3d545c |
|
BLAKE2b-256 | fc0167c7fc0df5d8eb3bb2f33c4cda88d440da945a8b6d6d561b5578c289c99e |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f730059303fabd898788701fd95cbc7781a041cd39a98877638efdece01421 |
|
MD5 | 1e31fd4802f739050f1dfd4f75179b78 |
|
BLAKE2b-256 | d3788a59f25e327bb7eefc347362d14b86f349a52fb6d595cb9f75d41002361e |