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.36.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4201d2b0a8934e0e00a69f87ebed2668331509f1aaa5d00dd81aca9164d4f575 |
|
MD5 | 843658aed4c2a929f280379d18fe1432 |
|
BLAKE2b-256 | fe6fb0c0888c6971790f20c9ab38413bfbf2c4fe4d71ed98816cdaaa36c70f9b |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-0.36.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d91e23ed783a23980481de57fcd5a4be741b684b9249c0997ba5d764adfb43e8 |
|
MD5 | b8ad23bba9cb11181f904aa9b4db61cf |
|
BLAKE2b-256 | 439845661db97d9047500e71fa62d30b67a1247bd137056b92ec7949e0619d22 |