CDK Constructs for AWS ElasticLoadBalancing
Project description
Amazon Elastic Load Balancing Construct Library
This is a developer preview (public beta) module. Releases might lack important features and might have future breaking changes.
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.37.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aab575b2a6441230401cd2f4fe85dc330ed0f5ff58fee2dc95782d734f1c0759 |
|
MD5 | 0e653f9f8ad63704d634f24b7203aded |
|
BLAKE2b-256 | 57f63f6ca67d1acfa25d2fc48e45ce09fae7df524e8624097e556685606de99e |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-0.37.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa1035739a4af5f1067d22b1221875ff0b9fe0b5b41b5ce9e710021c453f35b1 |
|
MD5 | 10cf5ad0c67c2643e6296b429487bfde |
|
BLAKE2b-256 | 585adadea8b5d37d80dfc7c247878ab33f0215c1f88803751da52c05bf373ea3 |