AWS CDK Construct Library to help create redirects on AWS application load balancers
Project description
AWS ELBv2 Redirection CDK Construct Library
This library makes it easy to creation redirection rules on Application Load Balancers.
Usage
Base redirection construct (Typescript)
// create a vpc
const vpc = new ec2.Vpc(stack, 'vpc');
// create an alb in that vpc
const alb = new elbv2.ApplicationLoadBalancer(stack, 'alb', {
internetFacing: true,
vpc,
});
// create a redirect from 8080 to 8443
new Redirect(stack, 'redirect', {
alb,
sourcePort: 8080,
sourceProtocol: elbv2.ApplicationProtocol.HTTP,
targetPort: 8443,
targetProtocol: elbv2.ApplicationProtocol.HTTPS,
});
Using the pre-build HTTP to HTTPS construct (Typescript)
// create a vpc
const vpc = new ec2.Vpc(stack, 'vpc');
// create an alb in that vpc
const alb = new elbv2.ApplicationLoadBalancer(stack, 'alb', {
internetFacing: true,
vpc,
});
// use the pre-built construct for HTTP to HTTPS
new RedirectHttpHttps(stack, 'redirectHttpHttps', {
alb,
});
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 renovosolutions.aws-cdk-aws-ipam-0.0.65.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e89c19d54f46a48ba3b85ce735064ee3473c620421ee2c8141c9114bd7603917 |
|
MD5 | d0658b71706611b8e04e9edc332a59c4 |
|
BLAKE2b-256 | a3e63e1dbbd5be2f43e556610d0b64d224e900bfaae5ac155ccde68acc00c80e |
Close
Hashes for renovosolutions.aws_cdk_aws_ipam-0.0.65-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75569cb352e775e040fd10b7e9c560cffa56f06a9259420ebc111a1df83e5650 |
|
MD5 | 885a251bf3d2e673ab963f39e89ca568 |
|
BLAKE2b-256 | f2852ddc4c2aee2e9c9f779af1449ee852b7b8d2b7d4e0e079e7db73d6d3bb3b |