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.41.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdb77329c6b4f293c26594e1ba806eb743d18a36c9151a8cbcffe1e77d21f9f2 |
|
MD5 | 13689db13aba141acc5491cefb3f5e94 |
|
BLAKE2b-256 | b08692e658cc0cfb1e9b872c8fa636c32c677923f6919f1a277c23164a8d5ef9 |
Close
Hashes for renovosolutions.aws_cdk_aws_ipam-0.0.41-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e32575efded049c52e3d24fe82014323c848ed526448c0148f9285c71b2afc0b |
|
MD5 | 792eedc55241dc0215f6b12af0f8d5a6 |
|
BLAKE2b-256 | 91ef1c2976a92822ad91266159b973189fb6b32d9e7a7ffbfa8b19b847fb5754 |