Skip to main content

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


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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file renovosolutions_aws_cdk_elbv2_redirect-0.0.270.tar.gz.

File metadata

File hashes

Hashes for renovosolutions_aws_cdk_elbv2_redirect-0.0.270.tar.gz
Algorithm Hash digest
SHA256 0bbf094ffccf491ec635597c6e6d0046802e12056bcf5ab8d095e882ac3f082a
MD5 1667ca15b6b5cd9e36a557f6de71a0ca
BLAKE2b-256 b9d9217f240be1faf6a2b8290e56db3cae3599969d06b90d7b6dd92791071269

See more details on using hashes here.

File details

Details for the file renovosolutions.aws_cdk_elbv2_redirect-0.0.270-py3-none-any.whl.

File metadata

File hashes

Hashes for renovosolutions.aws_cdk_elbv2_redirect-0.0.270-py3-none-any.whl
Algorithm Hash digest
SHA256 b9e9e9119d685a12c879e1fb237b71a4c21ba5a7aceba76ae1feb4eab4154410
MD5 f0999efd31391bfca9a5aa13c67c49ba
BLAKE2b-256 6a1af1cfed2cd72d77458af5faecbced74644fbd4f5711506a37bbfe7326d9b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page