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.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b84464be1d6deece75983e469b5da248ed261a7ef22af4ae488ad6606a1a8df7 |
|
MD5 | dea80428d284a522a7682b8218b3805b |
|
BLAKE2b-256 | 6e43adb6d9dcebf96ee1a104d5280d910d6cc96c22cd3a231f67049b6d1cbba2 |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-1.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d45285894a2df2fcf5aa9c77909290341dd82b6a7afba61c5d640e72e02bda64 |
|
MD5 | 14312e0bdd30f352a1e264bd40091976 |
|
BLAKE2b-256 | aa97a2cf856e6fca70558b6b2eae9c8de24dd2e02f96f7553d1290ab38c91c12 |