CDK Constructs for AWS ElasticLoadBalancing
Project description
AWS Elastic Load Balancing Construct Library
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.32.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a1533c2899d06b918489f1fbd42b620cfbb51f67122720f4d6415d646fd3b2 |
|
MD5 | ac82f38e830ce033533517260d50b5a3 |
|
BLAKE2b-256 | 3215f8533d126307c602c1c8f97f2bac7a2ea4d786f66b0dfded61e69a689f5e |
Close
Hashes for aws_cdk.aws_elasticloadbalancing-0.32.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53c9fdd88eaa1a20b76d7c1bd5a5344d6e1d684c939e0d4f06c1a2e8ca813eab |
|
MD5 | a0307f8775fb8f2ad49885e3ac6e57b9 |
|
BLAKE2b-256 | 2de2ae505f285948816c2c1435f4e4437a204bcb51e59e5244e559e8e207c262 |