forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING: move LoadBalancer to aws-elasticloadbalancing package (aws…
…#705) This is where it should have been all along.
- Loading branch information
Showing
18 changed files
with
444 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
## CDK Constructs for AWS Elastic Load Balancing (ELB) | ||
This module is part of the [AWS Cloud Development Kit](https://github.com/awslabs/aws-cdk) project. | ||
## 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. | ||
|
||
```ts | ||
const lb = new elb.LoadBalancer(stack, '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] | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
// AWS::ElasticLoadBalancing CloudFormation Resources: | ||
export * from './elasticloadbalancing.generated'; | ||
|
||
export * from './load-balancer'; |
Oops, something went wrong.